Skip to content

Commit 88077c8

Browse files
committed
Added suppor for GL_ARB_framebuffer_no_attachments.
1 parent c0ce792 commit 88077c8

File tree

5 files changed

+114
-1
lines changed

5 files changed

+114
-1
lines changed

OpenGLRaw.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ library
143143
Graphics.Rendering.OpenGL.Raw.EXT.FourTwoTwoPixels,
144144
Graphics.Rendering.OpenGL.Raw.EXT.FragmentLighting,
145145
Graphics.Rendering.OpenGL.Raw.EXT.FramebufferObject,
146+
Graphics.Rendering.OpenGL.Raw.ARB.FramebufferNoAttachments,
146147
Graphics.Rendering.OpenGL.Raw.EXT.FramebufferSRGB,
147148
Graphics.Rendering.OpenGL.Raw.EXT.GeometryShader4,
148149
Graphics.Rendering.OpenGL.Raw.EXT.GpuProgramParameters,

src/Graphics/Rendering/OpenGL/Raw/ARB.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ module Graphics.Rendering.OpenGL.Raw.ARB (
9595
module Graphics.Rendering.OpenGL.Raw.ARB.ShaderAtomicCounters, -- #114
9696
module Graphics.Rendering.OpenGL.Raw.ARB.ComputeShader, -- #122
9797
module Graphics.Rendering.OpenGL.Raw.ARB.ES3Compatibility, -- #127
98+
module Graphics.Rendering.OpenGL.Raw.ARB.FramebufferNoAttachments, -- #130
9899
module Graphics.Rendering.OpenGL.Raw.ARB.ShaderStorageBufferObject, -- #137
99100
module Graphics.Rendering.OpenGL.Raw.ARB.QueryBufferObject -- #148
100101
) where
@@ -176,5 +177,6 @@ import Graphics.Rendering.OpenGL.Raw.ARB.SeparateShaderObjects
176177
import Graphics.Rendering.OpenGL.Raw.ARB.ShaderAtomicCounters
177178
import Graphics.Rendering.OpenGL.Raw.ARB.ComputeShader
178179
import Graphics.Rendering.OpenGL.Raw.ARB.ES3Compatibility
180+
import Graphics.Rendering.OpenGL.Raw.ARB.FramebufferNoAttachments
179181
import Graphics.Rendering.OpenGL.Raw.ARB.ShaderStorageBufferObject
180182
import Graphics.Rendering.OpenGL.Raw.ARB.QueryBufferObject
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{-# LANGUAGE ForeignFunctionInterface, CPP #-}
2+
--------------------------------------------------------------------------------
3+
-- |
4+
-- Module : Graphics.Rendering.OpenGL.Raw.ARB.FramebufferNoAttachments
5+
-- Copyright : (c) Sven Panne 2013
6+
-- License : BSD3
7+
--
8+
-- Maintainer : Sven Panne <[email protected]>
9+
-- Stability : stable
10+
-- Portability : portable
11+
--
12+
-- All raw functions and tokens from the ARB_framebuffer_no_attachments
13+
-- extension, see
14+
-- <http://www.opengl.org/registry/specs/ARB/framebuffer_no_attachments.txt>.
15+
--
16+
--------------------------------------------------------------------------------
17+
18+
module Graphics.Rendering.OpenGL.Raw.ARB.FramebufferNoAttachments (
19+
-- * Functions
20+
glFramebufferParameteri,
21+
glGetFramebufferParameteriv,
22+
23+
-- * Tokens
24+
gl_FRAMEBUFFER_DEFAULT_WIDTH,
25+
gl_FRAMEBUFFER_DEFAULT_HEIGHT,
26+
gl_FRAMEBUFFER_DEFAULT_LAYERS,
27+
gl_FRAMEBUFFER_DEFAULT_SAMPLES,
28+
gl_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS,
29+
gl_MAX_FRAMEBUFFER_WIDTH,
30+
gl_MAX_FRAMEBUFFER_HEIGHT,
31+
gl_MAX_FRAMEBUFFER_LAYERS,
32+
gl_MAX_FRAMEBUFFER_SAMPLES
33+
) where
34+
35+
import Foreign.C.Types
36+
import Foreign.Ptr
37+
import Graphics.Rendering.OpenGL.Raw.Extensions
38+
import Graphics.Rendering.OpenGL.Raw.Types
39+
40+
#include "HsOpenGLRaw.h"
41+
42+
extensionNameString :: String
43+
extensionNameString = "GL_ARB_framebuffer_no_attachments"
44+
45+
EXTENSION_ENTRY(glFramebufferParameteri,GLenum -> GLenum -> GLint -> IO ())
46+
EXTENSION_ENTRY(glGetFramebufferParameteriv,GLenum -> GLenum -> Ptr GLint)
47+
48+
gl_FRAMEBUFFER_DEFAULT_WIDTH :: GLenum
49+
gl_FRAMEBUFFER_DEFAULT_WIDTH = 0x9310
50+
51+
gl_FRAMEBUFFER_DEFAULT_HEIGHT :: GLenum
52+
gl_FRAMEBUFFER_DEFAULT_HEIGHT = 0x9311
53+
54+
gl_FRAMEBUFFER_DEFAULT_LAYERS :: GLenum
55+
gl_FRAMEBUFFER_DEFAULT_LAYERS = 0x9312
56+
57+
gl_FRAMEBUFFER_DEFAULT_SAMPLES :: GLenum
58+
gl_FRAMEBUFFER_DEFAULT_SAMPLES = 0x9313
59+
60+
gl_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS :: GLenum
61+
gl_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = 0x9314
62+
63+
gl_MAX_FRAMEBUFFER_WIDTH :: GLenum
64+
gl_MAX_FRAMEBUFFER_WIDTH = 0x9315
65+
66+
gl_MAX_FRAMEBUFFER_HEIGHT :: GLenum
67+
gl_MAX_FRAMEBUFFER_HEIGHT = 0x9316
68+
69+
gl_MAX_FRAMEBUFFER_LAYERS :: GLenum
70+
gl_MAX_FRAMEBUFFER_LAYERS = 0x9317
71+
72+
gl_MAX_FRAMEBUFFER_SAMPLES :: GLenum
73+
gl_MAX_FRAMEBUFFER_SAMPLES = 0x9318
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
--------------------------------------------------------------------------------
2+
-- |
3+
-- Module : Graphics.Rendering.OpenGL.Raw.Core31.Types
4+
-- Copyright : (c) Sven Panne 2013
5+
-- License : BSD3
6+
--
7+
-- Maintainer : Sven Panne <[email protected]>
8+
-- Stability : stable
9+
-- Portability : portable
10+
--
11+
-- This module corresponds to table 2.2 in section 2.3 (Command Syntax) of the
12+
-- OpenGL 3.1 specs.
13+
--
14+
--------------------------------------------------------------------------------
15+
16+
module Graphics.Rendering.OpenGL.Raw.Core31.Types (
17+
GLboolean,
18+
GLbyte,
19+
GLubyte,
20+
GLchar,
21+
GLshort,
22+
GLushort,
23+
GLint,
24+
GLuint,
25+
GLsizei,
26+
GLenum,
27+
GLintptr,
28+
GLsizeiptr,
29+
GLbitfield,
30+
GLhalf,
31+
GLfloat,
32+
GLclampf,
33+
GLdouble,
34+
GLclampd
35+
) where
36+
37+
import Graphics.Rendering.OpenGL.Raw.Types

src/Graphics/Rendering/OpenGL/Raw/EXT/DirectStateAccess.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ module Graphics.Rendering.OpenGL.Raw.EXT.DirectStateAccess (
216216

217217
import Foreign.C.Types
218218
import Foreign.Ptr
219+
import Graphics.Rendering.OpenGL.Raw.ARB.FramebufferNoAttachments
219220
import Graphics.Rendering.OpenGL.Raw.ARB.SeparateShaderObjects
220221
import Graphics.Rendering.OpenGL.Raw.Core31.Types
221222
import Graphics.Rendering.OpenGL.Raw.Extensions
@@ -377,7 +378,6 @@ EXTENSION_ENTRY(glGenerateMultiTexMipmap,GLenum -> GLenum -> IO ())
377378
EXTENSION_ENTRY(glFramebufferDrawBuffer,GLuint -> GLenum -> IO ())
378379
EXTENSION_ENTRY(glFramebufferDrawBuffers,GLuint -> GLsizei -> Ptr GLenum -> IO ())
379380
EXTENSION_ENTRY(glFramebufferReadBuffer,GLuint -> GLenum -> IO ())
380-
EXTENSION_ENTRY(glGetFramebufferParameteriv,GLuint -> GLenum -> Ptr GLint -> IO ())
381381
EXTENSION_ENTRY(glNamedFramebufferTexture,GLuint -> GLenum -> GLuint -> GLint -> IO ())
382382
EXTENSION_ENTRY(glNamedFramebufferTextureLayer,GLuint -> GLenum -> GLuint -> GLint -> GLint -> IO ())
383383
EXTENSION_ENTRY(glNamedFramebufferTextureFace,GLuint -> GLenum -> GLuint -> GLint -> GLenum -> IO ())

0 commit comments

Comments
 (0)