minor cleanup
This commit is contained in:
parent
1e9c6a24fd
commit
32f1043d7c
@ -238,7 +238,7 @@ createVAO bo = do
|
||||
|
||||
initVAO :: AttribLocation -> IQMVertexArrayType -> [(IQMVertexArray, BufferObject)] -> IO ()
|
||||
initVAO l t bo = do
|
||||
print t
|
||||
print $ concat ["adding ", show t, " to vertexBufferObject"]
|
||||
let (IQMVertexArray _ _ _ num _ _,buf) = case filter (\(IQMVertexArray ty _ _ _ _ _, _) -> ty == t) bo of
|
||||
[(a,b)] -> (a,b)
|
||||
_ -> error "IQM-Object not render-able with current shader-mechanics"
|
||||
|
@ -288,7 +288,9 @@ renderIQM :: IQM -> L.V3 CFloat -> L.V3 CFloat -> IO ()
|
||||
renderIQM m p@(L.V3 x y z) s@(L.V3 sx sy sz) = do
|
||||
bindVertexArrayObject $= Just (vertexArrayObject m)
|
||||
let n = num_vertexes.header $ m
|
||||
--print $ concat ["drawing ", show n," triangles from object ",show m]
|
||||
glDrawArrays gl_TRIANGLES 0 (fromIntegral n)
|
||||
checkError "drawing model"
|
||||
return ()
|
||||
|
||||
renderObject :: MapObject -> IO ()
|
||||
|
Loading…
Reference in New Issue
Block a user