Reformat to something more readable for me :3
This commit is contained in:
@@ -156,7 +156,7 @@ static void load_collision_mesh( CollisionMesh *mesh )
|
||||
glBindBuffer( GL_ARRAY_BUFFER, buff ); \
|
||||
glBufferData( GL_ARRAY_BUFFER, mesh->num_vertices*sizeof( type ), arr, GL_STATIC_DRAW ); \
|
||||
glEnableVertexAttribArray( loc ); \
|
||||
glVertexAttribPointer( loc, sizeof( type ) / sizeof( float ), GL_FLOAT, GL_FALSE, sizeof( type ), NULL ); \
|
||||
glVertexAttribPointer( loc, sizeof( type ) / sizeof( float ), GL_FLOAT, GL_FALSE, sizeof( type ), nullptr ); \
|
||||
} while( 0 )
|
||||
|
||||
X( 0, mesh->position_buffer, mesh->position, vec3 );
|
||||
@@ -181,7 +181,7 @@ static void load_mario_mesh( MarioMesh *mesh, struct SM64MarioGeometryBuffers *m
|
||||
glBindBuffer( GL_ARRAY_BUFFER, buff ); \
|
||||
glBufferData( GL_ARRAY_BUFFER, sizeof( type ) * 3 * SM64_GEO_MAX_TRIANGLES, arr, GL_DYNAMIC_DRAW ); \
|
||||
glEnableVertexAttribArray( loc ); \
|
||||
glVertexAttribPointer( loc, sizeof( type ) / sizeof( float ), GL_FLOAT, GL_FALSE, sizeof( type ), NULL ); \
|
||||
glVertexAttribPointer( loc, sizeof( type ) / sizeof( float ), GL_FLOAT, GL_FALSE, sizeof( type ), nullptr ); \
|
||||
} while( 0 )
|
||||
|
||||
X( 0, mesh->position_buffer, marioGeo->position, vec3 );
|
||||
@@ -194,7 +194,7 @@ static void load_mario_mesh( MarioMesh *mesh, struct SM64MarioGeometryBuffers *m
|
||||
|
||||
static void update_mario_mesh( MarioMesh *mesh, struct SM64MarioGeometryBuffers *marioGeo )
|
||||
{
|
||||
if( mesh->index == NULL )
|
||||
if( mesh->index == nullptr )
|
||||
load_mario_mesh( mesh, marioGeo );
|
||||
|
||||
mesh->num_vertices = 3 * marioGeo->numTrianglesUsed;
|
||||
|
||||
Reference in New Issue
Block a user