Guest User

Untitled

a guest
May 24th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.60 KB | None | 0 0
  1. // render the specified mesh
  2. void renderer_drawmesh( u32 x, u32 y, u32 z, float rx, float ry, float rz, u8* mesh ) {
  3.     glPushMatrix();
  4.    
  5.     glTranslate3f32( x, y, z );                                     //move it away from the camera floattof32(-10)
  6.            
  7.     glRotateX( rx );                                                // 0-360
  8.     glRotateY( ry );
  9.     glRotateZ( rz );
  10.    
  11.     glMatrixMode( GL_TEXTURE );
  12.     glLoadIdentity();
  13.    
  14.     glMatrixMode( GL_MODELVIEW );
  15.  
  16.     glPolyFmt( POLY_ALPHA( 31 ) | POLY_CULL_BACK | POLY_FORMAT_LIGHT0 | POLY_FORMAT_LIGHT1 | POLY_FORMAT_LIGHT2 | POLY_FORMAT_LIGHT3 );
  17.    
  18.     glCallList( (u32*) mesh );
  19.     glEnd();
  20.    
  21.     glPopMatrix( 1 );
  22.     glFlush( 0 );
  23. }
Add Comment
Please, Sign In to add comment