summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKosyrev Serge <_deepfire@feelingofgreen.ru>2018-09-18 01:14:11 +0300
committerKosyrev Serge <_deepfire@feelingofgreen.ru>2018-09-19 03:21:14 +0300
commit8c0aa6062a30160f0655d1be767d7ee77b4809ce (patch)
tree4890d1bdb47fd16f0172011d4df070b731032f12
parent764b311c080480bb66b1096974f62c6d9a1e8ada (diff)
types: introduce GLOutput into GLRenderer
-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