First implementation of SSBO, vertex pulling
This commit is contained in:
+9
-1
@@ -110,6 +110,9 @@ doDrawing' win pdata u = do
|
||||
]
|
||||
-- set the coordinate uniform ready for drawing elements using world coordinates
|
||||
bufferPerspectiveMatrixUBO cfig (w ^. wCam) (pdata ^. matUBO)
|
||||
glNamedBufferSubData (pdata ^. winSSBO) 0
|
||||
(fromIntegral $ nWins * sizeOf (0::Float) * 8)
|
||||
(pdata ^. vboWindows . vboPtr)
|
||||
setViewport _gr_world_res cfig
|
||||
glBindFramebuffer GL_FRAMEBUFFER (pdata ^. fboBase . _1 . unFBO)
|
||||
glDepthMask GL_TRUE
|
||||
@@ -373,7 +376,12 @@ doDrawing' win pdata u = do
|
||||
glDepthFunc GL_LEQUAL
|
||||
glCullFace GL_BACK
|
||||
glDisable GL_BLEND
|
||||
drawShader (_windowShader pdata) nWins
|
||||
glDepthFunc GL_ALWAYS
|
||||
glDisable GL_CULL_FACE
|
||||
glUseProgram $ pdata ^. windowPullShader . shaderUINT
|
||||
glBindVertexArray $ pdata ^. dummyVAO . vaoName
|
||||
glDrawArrays GL_TRIANGLES 0 (fromIntegral nWins * 6)
|
||||
--drawShader (_windowShader pdata) nWins
|
||||
glDisable GL_DEPTH_CLAMP
|
||||
glDisable GL_CULL_FACE
|
||||
glInvalidateBufferData (pdata ^. vboShapes . vboName)
|
||||
|
||||
Reference in New Issue
Block a user