Work on lightmaps, add file
This commit is contained in:
@@ -80,13 +80,15 @@ makeShaderUsingVBO ::
|
||||
[GLenum] ->
|
||||
-- | The input vertex sizes
|
||||
[Int] ->
|
||||
-- | The stride
|
||||
Int ->
|
||||
PrimitiveMode ->
|
||||
VBO ->
|
||||
IO Shader
|
||||
makeShaderUsingVBO s shaderlist sizes strd pm vbo = setupVAOvbo sizes strd vbo
|
||||
>>= makeShaderUsingVAO s shaderlist pm
|
||||
makeShaderUsingVBO s shaderlist sizes pm vbo = do
|
||||
let strd = vbo ^. vboVertexSize
|
||||
when (strd < sum sizes) $
|
||||
error "Tried to assign vertex attributes to VBO with too small a stride."
|
||||
vao <- setupVAOvbo sizes strd vbo
|
||||
makeShaderUsingVAO s shaderlist pm vao
|
||||
|
||||
setupVBO :: Int -> IO VBO
|
||||
setupVBO vertexsize = do
|
||||
|
||||
+3
-6
@@ -47,16 +47,13 @@ pokeVerx vbos offsets Verx{_vxPos = thePos, _vxCol = theCol, _vxExt = ext, _vxSh
|
||||
pokeWallsWindows ::
|
||||
Ptr Float ->
|
||||
Ptr Float ->
|
||||
Ptr Float ->
|
||||
[((Point2, Point2), Point4)] ->
|
||||
[((Point2, Point2), Point4)] ->
|
||||
[Wall] ->
|
||||
IO (Int, Int, Int)
|
||||
pokeWallsWindows wlptr wiptr truewlptr wls wis truewls = do
|
||||
wlcounts1 <- VFSM.foldlM' (pokeW wlptr) 0 (VFSM.fromList wls)
|
||||
IO (Int, Int)
|
||||
pokeWallsWindows wiptr truewlptr wis truewls = do
|
||||
wlcounts2 <- VFSM.foldlM' (pokeW wiptr) 0 (VFSM.fromList wis)
|
||||
wlcounts3 <- VFSM.foldlM' (pokeWall truewlptr) 0 (VFSM.fromList truewls)
|
||||
return (wlcounts1, wlcounts2, wlcounts3)
|
||||
return ( wlcounts2, wlcounts3)
|
||||
|
||||
pokeFloors :: Ptr Float ->
|
||||
[(Point3, Point3)] ->
|
||||
|
||||
Reference in New Issue
Block a user