Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // render the specified mesh
- void renderer_drawmesh( u32 x, u32 y, u32 z, float rx, float ry, float rz, u8* mesh ) {
- glPushMatrix();
- glTranslate3f32( x, y, z ); //move it away from the camera floattof32(-10)
- glRotateX( rx ); // 0-360
- glRotateY( ry );
- glRotateZ( rz );
- glMatrixMode( GL_TEXTURE );
- glLoadIdentity();
- glMatrixMode( GL_MODELVIEW );
- glPolyFmt( POLY_ALPHA( 31 ) | POLY_CULL_BACK | POLY_FORMAT_LIGHT0 | POLY_FORMAT_LIGHT1 | POLY_FORMAT_LIGHT2 | POLY_FORMAT_LIGHT3 );
- glCallList( (u32*) mesh );
- glEnd();
- glPopMatrix( 1 );
- glFlush( 0 );
- }
Add Comment
Please, Sign In to add comment