Commit before making large changes to cylinder shape
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
"_graphics_num_shadow_casters": "NumShadowCasters20",
|
||||
"_graphics_shadow_rendering": "GeoObjShads",
|
||||
"_graphics_shadow_size": "Typical",
|
||||
"_graphics_world_resolution": "FullRes",
|
||||
"_graphics_world_resolution": "QuarterRes",
|
||||
"_volume_master": 1,
|
||||
"_volume_music": 0,
|
||||
"_volume_sound": 1,
|
||||
|
||||
+22
-19
@@ -212,8 +212,10 @@ pokeCylinderCaps :: Float -> Point4 -> Ptr Float -> Point3 -> Point3 -> [Point3]
|
||||
{-# INLINE pokeCylinderCaps #-}
|
||||
pokeCylinderCaps xdata col ptr tc bc = go True
|
||||
where
|
||||
go True (x : xs) n = pokeJustVInvNormal xdata tc col ptr n x >>= go False xs
|
||||
go False (x : xs) n = pokeJustVInvNormal xdata bc col ptr n x >>= go True xs
|
||||
-- go True (x : xs) n = pokeJustVInvNormal xdata tc col ptr n x >>= go False xs
|
||||
-- go False (x : xs) n = pokeJustVInvNormal xdata bc col ptr n x >>= go True xs
|
||||
go True (x : xs) n = pokeFlatV xdata tc col ptr n x >>= go False xs
|
||||
go False (x : xs) n = pokeFlatV xdata bc col ptr n x >>= go True xs
|
||||
go _ [] n = return n
|
||||
|
||||
pokeBox ::
|
||||
@@ -444,23 +446,23 @@ pokeJustV xdata cp col ptr nv sh = do
|
||||
V3 x y z = sh
|
||||
V3 nx ny nz = cp
|
||||
|
||||
pokeJustVInvNormal ::
|
||||
Float ->
|
||||
Point3 ->
|
||||
Point4 ->
|
||||
Ptr Float ->
|
||||
Int ->
|
||||
Point3 ->
|
||||
IO Int
|
||||
{-# INLINE pokeJustVInvNormal #-}
|
||||
pokeJustVInvNormal xdata cp col ptr nv sh = do
|
||||
pokeByteOff ptr (nv * shapeVerxSize) (V4 x y z xdata)
|
||||
pokeByteOff ptr (nv *shapeVerxSize + 4 * floatSize) (toColor8 col)
|
||||
pokeByteOff ptr (nv *shapeVerxSize + 4 * (floatSize + ubyteSize)) (V4 nx ny nz 1)
|
||||
return (nv + 1)
|
||||
where
|
||||
V3 x y z = sh
|
||||
V3 nx ny nz = (2 * sh) - cp
|
||||
--pokeJustVInvNormal ::
|
||||
-- Float ->
|
||||
-- Point3 ->
|
||||
-- Point4 ->
|
||||
-- Ptr Float ->
|
||||
-- Int ->
|
||||
-- Point3 ->
|
||||
-- IO Int
|
||||
--{-# INLINE pokeJustVInvNormal #-}
|
||||
--pokeJustVInvNormal xdata cp col ptr nv sh = do
|
||||
-- pokeByteOff ptr (nv * shapeVerxSize) (V4 x y z xdata)
|
||||
-- pokeByteOff ptr (nv *shapeVerxSize + 4 * floatSize) (toColor8 col)
|
||||
-- pokeByteOff ptr (nv *shapeVerxSize + 4 * (floatSize + ubyteSize)) (V4 nx ny nz 1)
|
||||
-- return (nv + 1)
|
||||
-- where
|
||||
-- V3 x y z = sh
|
||||
-- V3 nx ny nz = (2 * sh) - cp
|
||||
|
||||
pokeFlatV ::
|
||||
Float ->
|
||||
@@ -479,6 +481,7 @@ pokeFlatV xdata norm col ptr nv sh = do
|
||||
where
|
||||
V3 x y z = sh
|
||||
V3 nx ny nz = sh - norm
|
||||
-- V3 nx ny nz = norm
|
||||
|
||||
pokeLayVerxs ::
|
||||
MV.MVector (PrimState IO) (Shader, VBO) ->
|
||||
|
||||
Reference in New Issue
Block a user