Skip to content

Commit

Permalink
Added suppor for GL_ARB_framebuffer_no_attachments.
Browse files Browse the repository at this point in the history
  • Loading branch information
svenpanne committed Sep 8, 2013
1 parent c0ce792 commit 88077c8
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 1 deletion.
1 change: 1 addition & 0 deletions OpenGLRaw.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ library
Graphics.Rendering.OpenGL.Raw.EXT.FourTwoTwoPixels,
Graphics.Rendering.OpenGL.Raw.EXT.FragmentLighting,
Graphics.Rendering.OpenGL.Raw.EXT.FramebufferObject,
Graphics.Rendering.OpenGL.Raw.ARB.FramebufferNoAttachments,
Graphics.Rendering.OpenGL.Raw.EXT.FramebufferSRGB,
Graphics.Rendering.OpenGL.Raw.EXT.GeometryShader4,
Graphics.Rendering.OpenGL.Raw.EXT.GpuProgramParameters,
Expand Down
2 changes: 2 additions & 0 deletions src/Graphics/Rendering/OpenGL/Raw/ARB.hs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ module Graphics.Rendering.OpenGL.Raw.ARB (
module Graphics.Rendering.OpenGL.Raw.ARB.ShaderAtomicCounters, -- #114
module Graphics.Rendering.OpenGL.Raw.ARB.ComputeShader, -- #122
module Graphics.Rendering.OpenGL.Raw.ARB.ES3Compatibility, -- #127
module Graphics.Rendering.OpenGL.Raw.ARB.FramebufferNoAttachments, -- #130
module Graphics.Rendering.OpenGL.Raw.ARB.ShaderStorageBufferObject, -- #137
module Graphics.Rendering.OpenGL.Raw.ARB.QueryBufferObject -- #148
) where
Expand Down Expand Up @@ -176,5 +177,6 @@ import Graphics.Rendering.OpenGL.Raw.ARB.SeparateShaderObjects
import Graphics.Rendering.OpenGL.Raw.ARB.ShaderAtomicCounters
import Graphics.Rendering.OpenGL.Raw.ARB.ComputeShader
import Graphics.Rendering.OpenGL.Raw.ARB.ES3Compatibility
import Graphics.Rendering.OpenGL.Raw.ARB.FramebufferNoAttachments
import Graphics.Rendering.OpenGL.Raw.ARB.ShaderStorageBufferObject
import Graphics.Rendering.OpenGL.Raw.ARB.QueryBufferObject
73 changes: 73 additions & 0 deletions src/Graphics/Rendering/OpenGL/Raw/ARB/FramebufferNoAttachments.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{-# LANGUAGE ForeignFunctionInterface, CPP #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.ARB.FramebufferNoAttachments
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <[email protected]>
-- Stability : stable
-- Portability : portable
--
-- All raw functions and tokens from the ARB_framebuffer_no_attachments
-- extension, see
-- <http://www.opengl.org/registry/specs/ARB/framebuffer_no_attachments.txt>.
--
--------------------------------------------------------------------------------

module Graphics.Rendering.OpenGL.Raw.ARB.FramebufferNoAttachments (
-- * Functions
glFramebufferParameteri,
glGetFramebufferParameteriv,

-- * Tokens
gl_FRAMEBUFFER_DEFAULT_WIDTH,
gl_FRAMEBUFFER_DEFAULT_HEIGHT,
gl_FRAMEBUFFER_DEFAULT_LAYERS,
gl_FRAMEBUFFER_DEFAULT_SAMPLES,
gl_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS,
gl_MAX_FRAMEBUFFER_WIDTH,
gl_MAX_FRAMEBUFFER_HEIGHT,
gl_MAX_FRAMEBUFFER_LAYERS,
gl_MAX_FRAMEBUFFER_SAMPLES
) where

import Foreign.C.Types
import Foreign.Ptr
import Graphics.Rendering.OpenGL.Raw.Extensions
import Graphics.Rendering.OpenGL.Raw.Types

#include "HsOpenGLRaw.h"

extensionNameString :: String
extensionNameString = "GL_ARB_framebuffer_no_attachments"

EXTENSION_ENTRY(glFramebufferParameteri,GLenum -> GLenum -> GLint -> IO ())
EXTENSION_ENTRY(glGetFramebufferParameteriv,GLenum -> GLenum -> Ptr GLint)

gl_FRAMEBUFFER_DEFAULT_WIDTH :: GLenum
gl_FRAMEBUFFER_DEFAULT_WIDTH = 0x9310

gl_FRAMEBUFFER_DEFAULT_HEIGHT :: GLenum
gl_FRAMEBUFFER_DEFAULT_HEIGHT = 0x9311

gl_FRAMEBUFFER_DEFAULT_LAYERS :: GLenum
gl_FRAMEBUFFER_DEFAULT_LAYERS = 0x9312

gl_FRAMEBUFFER_DEFAULT_SAMPLES :: GLenum
gl_FRAMEBUFFER_DEFAULT_SAMPLES = 0x9313

gl_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS :: GLenum
gl_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = 0x9314

gl_MAX_FRAMEBUFFER_WIDTH :: GLenum
gl_MAX_FRAMEBUFFER_WIDTH = 0x9315

gl_MAX_FRAMEBUFFER_HEIGHT :: GLenum
gl_MAX_FRAMEBUFFER_HEIGHT = 0x9316

gl_MAX_FRAMEBUFFER_LAYERS :: GLenum
gl_MAX_FRAMEBUFFER_LAYERS = 0x9317

gl_MAX_FRAMEBUFFER_SAMPLES :: GLenum
gl_MAX_FRAMEBUFFER_SAMPLES = 0x9318
37 changes: 37 additions & 0 deletions src/Graphics/Rendering/OpenGL/Raw/Core31/Types.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.Core31.Types
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <[email protected]>
-- Stability : stable
-- Portability : portable
--
-- This module corresponds to table 2.2 in section 2.3 (Command Syntax) of the
-- OpenGL 3.1 specs.
--
--------------------------------------------------------------------------------

module Graphics.Rendering.OpenGL.Raw.Core31.Types (
GLboolean,
GLbyte,
GLubyte,
GLchar,
GLshort,
GLushort,
GLint,
GLuint,
GLsizei,
GLenum,
GLintptr,
GLsizeiptr,
GLbitfield,
GLhalf,
GLfloat,
GLclampf,
GLdouble,
GLclampd
) where

import Graphics.Rendering.OpenGL.Raw.Types
2 changes: 1 addition & 1 deletion src/Graphics/Rendering/OpenGL/Raw/EXT/DirectStateAccess.hs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ module Graphics.Rendering.OpenGL.Raw.EXT.DirectStateAccess (

import Foreign.C.Types
import Foreign.Ptr
import Graphics.Rendering.OpenGL.Raw.ARB.FramebufferNoAttachments
import Graphics.Rendering.OpenGL.Raw.ARB.SeparateShaderObjects
import Graphics.Rendering.OpenGL.Raw.Core31.Types
import Graphics.Rendering.OpenGL.Raw.Extensions
Expand Down Expand Up @@ -377,7 +378,6 @@ EXTENSION_ENTRY(glGenerateMultiTexMipmap,GLenum -> GLenum -> IO ())
EXTENSION_ENTRY(glFramebufferDrawBuffer,GLuint -> GLenum -> IO ())
EXTENSION_ENTRY(glFramebufferDrawBuffers,GLuint -> GLsizei -> Ptr GLenum -> IO ())
EXTENSION_ENTRY(glFramebufferReadBuffer,GLuint -> GLenum -> IO ())
EXTENSION_ENTRY(glGetFramebufferParameteriv,GLuint -> GLenum -> Ptr GLint -> IO ())
EXTENSION_ENTRY(glNamedFramebufferTexture,GLuint -> GLenum -> GLuint -> GLint -> IO ())
EXTENSION_ENTRY(glNamedFramebufferTextureLayer,GLuint -> GLenum -> GLuint -> GLint -> GLint -> IO ())
EXTENSION_ENTRY(glNamedFramebufferTextureFace,GLuint -> GLenum -> GLuint -> GLint -> GLenum -> IO ())
Expand Down

0 comments on commit 88077c8

Please sign in to comment.