Skip to content

Commit b4db083

Browse files
committed
Added a few functions as reminders of what's still missing.
1 parent 4131c36 commit b4db083

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

src/Graphics/Rendering/OpenGL/GL/Framebuffer.hs

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,21 @@ module Graphics.Rendering.OpenGL.GL.Framebuffer (
2929
ClearBuffer(..), clear,
3030
clearColor, clearIndex, clearDepth, clearDepthf, clearStencil, clearAccum,
3131

32+
-- clearBufferiv,
33+
-- clearBufferfv,
34+
-- clearBufferuiv,
35+
-- clearNamedFramebufferiv,
36+
-- clearNamedFramebufferfv,
37+
-- clearNamedFramebufferuiv,
38+
39+
-- clearBufferfi,
40+
-- clearNamedFramebufferfi,
41+
3242
-- * Invalidating Framebuffer Contents
43+
-- invalidateSubFramebuffer,
44+
-- invalidateNamedFramebufferSubData,
45+
-- invalidateFramebuffer,
46+
-- invalidateNamedFramebufferData,
3347

3448
-- * The Accumulation Buffer
3549
AccumOp(..), accum,
@@ -43,6 +57,7 @@ import Control.Monad
4357
import Data.Maybe
4458
import Data.StateVar
4559
import Foreign.Marshal.Array
60+
import Foreign.Ptr -- REMOVE ME ----------------------------------------------------------------------------------------------------
4661
import Graphics.Rendering.OpenGL.GL.BufferMode
4762
import Graphics.Rendering.OpenGL.GL.Capability
4863
import Graphics.Rendering.OpenGL.GL.Face
@@ -330,6 +345,50 @@ clearAccum =
330345
makeStateVar (getFloat4 Color4 GetAccumClearValue)
331346
(\(Color4 r g b a) -> glClearAccum r g b a)
332347

348+
-- buffer = COLOR => drawbuffer i (= DRAW_BUFFERi, DrawBufferIndex), pointer to 4 elems
349+
-- buffer = DEPTH => drawbuffer must be 0, only "f" version allowed, 1 elem
350+
-- buffer = STENCIL => drawbuffer must be 0, only "i" version allowed, 1 elem
351+
352+
clearBufferiv :: GLenum -> GLint -> Ptr GLint -> IO ()
353+
clearBufferiv = glClearBufferiv
354+
355+
clearBufferfv :: GLenum -> GLint -> Ptr GLfloat -> IO ()
356+
clearBufferfv = glClearBufferfv
357+
358+
clearBufferuiv :: GLenum -> GLint -> Ptr GLuint -> IO ()
359+
clearBufferuiv = glClearBufferuiv
360+
361+
clearNamedFramebufferiv :: GLuint -> GLenum -> GLint -> Ptr GLint -> IO ()
362+
clearNamedFramebufferiv = glClearNamedFramebufferiv
363+
364+
clearNamedFramebufferfv :: GLuint -> GLenum -> GLint -> Ptr GLfloat -> IO ()
365+
clearNamedFramebufferfv = glClearNamedFramebufferfv
366+
367+
clearNamedFramebufferuiv :: GLuint -> GLenum -> GLint -> Ptr GLuint -> IO ()
368+
clearNamedFramebufferuiv = glClearNamedFramebufferuiv
369+
370+
-- buffer must be DEPTH_STENCIL, drawbuffer must be 0, depth/stencil args
371+
372+
clearBufferfi :: GLenum -> GLint -> GLfloat -> GLint -> IO ()
373+
clearBufferfi = glClearBufferfi
374+
375+
clearNamedFramebufferfi :: GLuint -> GLenum -> GLfloat -> GLint -> IO ()
376+
clearNamedFramebufferfi = glClearNamedFramebufferfi
377+
378+
--------------------------------------------------------------------------------
379+
380+
invalidateSubFramebuffer :: GLenum -> GLsizei -> Ptr GLenum -> GLint -> GLint -> GLsizei -> GLsizei -> IO ()
381+
invalidateSubFramebuffer = glInvalidateSubFramebuffer
382+
383+
invalidateNamedFramebufferSubData :: GLuint -> GLsizei -> Ptr GLenum -> GLint -> GLint -> GLsizei -> GLsizei -> IO ()
384+
invalidateNamedFramebufferSubData = glInvalidateNamedFramebufferSubData
385+
386+
invalidateFramebuffer :: GLenum -> GLsizei -> Ptr GLenum -> IO ()
387+
invalidateFramebuffer = glInvalidateFramebuffer
388+
389+
invalidateNamedFramebufferData :: GLuint -> GLsizei -> Ptr GLenum -> IO ()
390+
invalidateNamedFramebufferData = glInvalidateNamedFramebufferData
391+
333392
--------------------------------------------------------------------------------
334393

335394
-- | The implementation and context dependent number of auxiliary buffers.

0 commit comments

Comments
 (0)