summaryrefslogtreecommitdiff
path: root/src/LambdaCube/GL/Type.hs
diff options
context:
space:
mode:
authorCsaba Hruska <csaba.hruska@gmail.com>2018-09-22 11:26:50 +0200
committerGitHub <noreply@github.com>2018-09-22 11:26:50 +0200
commit9f6e1725b52ea6f48101a37181f0aa9f7d1494d3 (patch)
tree7c10ffae525116bbdcf5a681f755e658078aa5fb /src/LambdaCube/GL/Type.hs
parent42bc23db138991343708d14e2b5032d2dabd3d0d (diff)
parenta5880684868824b34689df4589106730ad1c7fc0 (diff)
Merge pull request #13 from deepfire/master
Keep track of GLRenderer outputs and fix integer render textures
Diffstat (limited to 'src/LambdaCube/GL/Type.hs')
-rw-r--r--src/LambdaCube/GL/Type.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/LambdaCube/GL/Type.hs b/src/LambdaCube/GL/Type.hs
index 49491ed..bd3f827 100644
--- a/src/LambdaCube/GL/Type.hs
+++ b/src/LambdaCube/GL/Type.hs
@@ -152,6 +152,7 @@ data GLRenderer
152 , glTextures :: Vector GLTexture 152 , glTextures :: Vector GLTexture
153 , glSamplers :: Vector GLSampler 153 , glSamplers :: Vector GLSampler
154 , glTargets :: Vector GLRenderTarget 154 , glTargets :: Vector GLRenderTarget
155 , glOutputs :: [GLOutput]
155 , glCommands :: [GLCommand] 156 , glCommands :: [GLCommand]
156 , glSlotPrograms :: Vector [ProgramName] -- programs depend on a slot 157 , glSlotPrograms :: Vector [ProgramName] -- programs depend on a slot
157 , glInput :: IORef (Maybe InputConnection) 158 , glInput :: IORef (Maybe InputConnection)
@@ -177,6 +178,16 @@ data GLRenderTarget
177 , framebufferDrawbuffers :: Maybe [GLenum] 178 , framebufferDrawbuffers :: Maybe [GLenum]
178 } deriving Eq 179 } deriving Eq
179 180
181data GLOutput
182 = GLOutputDrawBuffer
183 { glOutputFBO :: GLuint
184 , glOutputDrawBuffer :: GLenum
185 }
186 | GLOutputRenderTexture
187 { glOutputFBO :: GLuint
188 , glOutputRenderTexture :: GLTexture
189 }
190
180type GLTextureUnit = Int 191type GLTextureUnit = Int
181type GLUniformBinding = GLint 192type GLUniformBinding = GLint
182 193