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;
|
||||
@@ -228,7 +228,7 @@ static GLuint shader_compile( const char *shaderContents, size_t shaderContentsL
|
||||
{
|
||||
GLint maxLength;
|
||||
glGetShaderiv( shader, GL_INFO_LOG_LENGTH, &maxLength );
|
||||
char *log = (char*)malloc( maxLength );
|
||||
char *log = malloc( maxLength );
|
||||
glGetShaderInfoLog( shader, maxLength, &maxLength, log );
|
||||
|
||||
printf( "Error in shader: %s\n%s\n%s\n", log, shaderStrings[0], shaderStrings[1] );
|
||||
|
||||
Reference in New Issue
Block a user