Pack shape normals into a word8

This commit is contained in:
2025-11-11 21:03:02 +00:00
parent 7f6e7d2741
commit ce438b7ecd
9 changed files with 109 additions and 113 deletions
+9 -13
View File
@@ -1,20 +1,16 @@
module Shape.Parameters
(shapeVerxSize,shapeVerxAttributes)
where
module Shape.Parameters (shapeVerxSize) where
-- ,shapeVerxAttributes) where
import Shader.Parameters
import Shader.Data
--import Data.Word
import Foreign.Storable
import Graphics.GL.Core45
shapeVerxSize :: Int
{-# INLINE shapeVerxSize #-}
shapeVerxSize = sizeOf (0 :: Float) * 12
shapeVerxAttributes :: [VertexAttribute]
shapeVerxAttributes =
[VertexAttribute 4 GL_FLOAT GL_FALSE 0
,VertexAttribute 4 GL_UNSIGNED_BYTE GL_TRUE (fromIntegral (4 :: Int) * fromIntegral floatSize)
,VertexAttribute 4 GL_FLOAT GL_FALSE (fromIntegral (8 :: Int) * fromIntegral (floatSize))
]
--shapeVerxAttributes :: [VertexAttribute]
--shapeVerxAttributes =
-- [VertexAttribute 4 GL_FLOAT GL_FALSE 0
-- ,VertexAttribute 4 GL_UNSIGNED_BYTE GL_TRUE (fromIntegral (4 :: Int) * fromIntegral floatSize)
-- ,VertexAttribute 4 GL_FLOAT GL_FALSE (fromIntegral (8 :: Int) * fromIntegral (floatSize))
-- ]