Poke word8 colors for shapes
This commit is contained in:
@@ -67,12 +67,17 @@ preloadRender = do
|
||||
|
||||
-- setup shape geometry/cap VBO and two VAOs
|
||||
putStrLn "Setup shape VBO, VAO, EBO"
|
||||
shVBO <- setupVBO (floatSize * nShapeVerxComp)
|
||||
shVBO <- setupVBO shapeVerxSize
|
||||
shPosVAO <- setupVAOUsingVBO [VertexAttribute 4 GL_FLOAT GL_FALSE 0] shVBO
|
||||
shEBO <- setupEBO shPosVAO
|
||||
-- note the shape shader vao is distinct from the position vao, but they
|
||||
-- share an EBO
|
||||
shapeshader <- makeShaderUsingVBO "shape/basic" [vert, frag] (toFloatVAs shapeVerxSizes) pmTriangles shVBO
|
||||
shapeshader <- makeShaderUsingVBO "shape/basic" [vert, frag]
|
||||
[VertexAttribute 4 GL_FLOAT GL_FALSE 0
|
||||
,VertexAttribute 4 GL_UNSIGNED_BYTE GL_TRUE (fromIntegral 4 * fromIntegral floatSize)
|
||||
,VertexAttribute 4 GL_FLOAT GL_FALSE (fromIntegral 4 * fromIntegral (floatSize + ubyteSize))
|
||||
]
|
||||
pmTriangles shVBO
|
||||
glVertexArrayElementBuffer (shapeshader ^. shaderVAO . vaoName) (shEBO ^. eboName)
|
||||
|
||||
--setup silhouette edge VAO
|
||||
|
||||
Reference in New Issue
Block a user