Refactor shaders, vbos and vaos
This commit is contained in:
+11
-10
@@ -171,18 +171,19 @@ pokeJustV :: Ptr Float
|
||||
-> IO Int
|
||||
{-# INLINE pokeJustV #-}
|
||||
pokeJustV ptr nv sh = do
|
||||
pokeElemOff ptr (off 0) a
|
||||
pokeElemOff ptr (off 1) b
|
||||
pokeElemOff ptr (off 2) c
|
||||
pokeElemOff ptr (off 3) d
|
||||
pokeElemOff ptr (off 4) e
|
||||
pokeElemOff ptr (off 5) f
|
||||
pokeElemOff ptr (off 6) g
|
||||
pokeElemOff ptr (off 0) x
|
||||
pokeElemOff ptr (off 1) y
|
||||
pokeElemOff ptr (off 2) z
|
||||
pokeElemOff ptr (off 3) 0
|
||||
pokeElemOff ptr (off 4) r
|
||||
pokeElemOff ptr (off 5) g
|
||||
pokeElemOff ptr (off 6) b
|
||||
pokeElemOff ptr (off 7) a
|
||||
return (nv + 1)
|
||||
where
|
||||
off i = nv*7 + i
|
||||
V3 a b c = _svPos sh
|
||||
V4 d e f g = _svCol sh
|
||||
off i = nv*8 + i
|
||||
V3 x y z = _svPos sh
|
||||
V4 r g b a = _svCol sh
|
||||
|
||||
pokeLayVerxs
|
||||
:: MV.MVector (PrimState IO) (FullShader ,VBO)
|
||||
|
||||
Reference in New Issue
Block a user