projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
needs a lot of cleaning but lights are OK
[carveJwlIkooP6JGAAIwe30JlM.git]
/
scene.h
diff --git
a/scene.h
b/scene.h
index 63b351d3e320fd74b5527a0b5532b786a5231c0c..fa1ce4dbc8bc782a23953c22889aa20d7c27d384 100644
(file)
--- a/
scene.h
+++ b/
scene.h
@@
-10,14
+10,14
@@
typedef struct scene_vert scene_vert;
#pragma pack(push,1)
#pragma pack(push,1)
-/*
28
byte vertexs, we don't care about the normals too much,
+/*
32
byte vertexs, we don't care about the normals too much,
* maybe possible to bring down uv to i16s too */
struct scene_vert
{
v3f co; /* 3*32 */
v2f uv; /* 2*32 */
i8 norm[4]; /* 4*8 */
* maybe possible to bring down uv to i16s too */
struct scene_vert
{
v3f co; /* 3*32 */
v2f uv; /* 2*32 */
i8 norm[4]; /* 4*8 */
- u
8 lights[4]; /* 4*8
*/
+ u
16 lights[4]; /* 4*16
*/
};
#pragma pack(pop)
};
#pragma pack(pop)
@@
-260,7
+260,7
@@
VG_STATIC void scene_upload( scene *pscene, glmesh *mesh )
glEnableVertexAttribArray( 2 );
/* 3: light cluster */
glEnableVertexAttribArray( 2 );
/* 3: light cluster */
- glVertexAttribIPointer( 3, 4, GL_UNSIGNED_
BYTE
,
+ glVertexAttribIPointer( 3, 4, GL_UNSIGNED_
SHORT
,
stride, (void *)offsetof(scene_vert, lights) );
glEnableVertexAttribArray( 3 );
stride, (void *)offsetof(scene_vert, lights) );
glEnableVertexAttribArray( 3 );