Cleanup
This commit is contained in:
@@ -7,8 +7,7 @@ import Geometry
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
|
||||
data Distortion
|
||||
= RadialDistortion Point2 Point2 Point2 Float
|
||||
data Distortion = RadialDistortion Point2 Point2 Point2 Float
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
deriveJSON defaultOptions ''Distortion
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
module Shader.Compile (
|
||||
-- makeShaderEBO,
|
||||
makeShaderVBO,
|
||||
-- makeShaderUsingVBO,
|
||||
makeShaderProgram,
|
||||
-- makeShaderUsingVAO,
|
||||
-- setupVAOUsingVBO,
|
||||
-- setupEBO,
|
||||
toFloatVAs,
|
||||
-- setupStaticVBOVAO,
|
||||
makeSourcedShader,
|
||||
) where
|
||||
|
||||
@@ -54,13 +48,10 @@ setupVBO vertexsize = do
|
||||
-- unclear whether this should also be multiplied by floatSize
|
||||
thePtr <- mallocBytes (vertexsize * numDrawableVertices)
|
||||
-- Allocate space
|
||||
--glNamedBufferData
|
||||
glNamedBufferStorage
|
||||
vboname
|
||||
(fromIntegral $ floatSize * numDrawableVertices * vertexsize)
|
||||
-- (fromIntegral $ numDrawableVertices * vertexsize)
|
||||
nullPtr
|
||||
--GL_STREAM_DRAW
|
||||
GL_DYNAMIC_STORAGE_BIT
|
||||
return VBO{_vboName = vboname, _vboPtr = thePtr, _vboVertexBytes = vertexsize}
|
||||
|
||||
|
||||
+1
-2
@@ -79,8 +79,7 @@ Vertex attributes are interleaved within the vbo.
|
||||
data VBO = VBO
|
||||
{ _vboName :: GLuint
|
||||
, _vboPtr :: Ptr Float
|
||||
, _vboVertexBytes :: Int
|
||||
-- add int for AMOUNT of data poked!
|
||||
, _vboVertexBytes :: Int -- size of one verx in bytes
|
||||
}
|
||||
|
||||
data FloatBO = FloatBO
|
||||
|
||||
Reference in New Issue
Block a user