Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void init_gl_screen()
- {
- // initialize gl
- glInit();
- //enable textures
- glEnable(GL_TEXTURE_2D);
- // enable antialiasing
- glEnable(GL_ANTIALIAS);
- // setup the rear plane
- glClearColor(0,0,0,31); // BG must be opaque for AA to work
- glClearPolyID(63); // BG must have a unique polygon ID for AA to work
- glClearDepth(GL_MAX_DEPTH);
- //this should work the same as the normal gl call
- glViewport(0,0,255,191);
- //any floating point gl call is being converted to fixed prior to being implemented
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- gluPerspective(70, 256.0 / 192.0, 1, 200);
- gluLookAt( 0.0, 0.0, 1.0, //camera possition
- 0.0, 0.0, 0.0, //look at
- 0.0, 1.0, 0.0); //up
- glMaterialf(GL_AMBIENT, RGB15(31,31,31));
- glMaterialf(GL_DIFFUSE, RGB15(31,31,31));
- glMaterialf(GL_SPECULAR, BIT(15) | RGB15(31,31,31));
- glMaterialf(GL_EMISSION, RGB15(31,31,31));
- //ds uses a table for shinyness..this generates a half-ass one
- glMaterialShinyness();
- //not a real gl function and will likely change
- glPolyFmt(POLY_ALPHA(31) | POLY_CULL_BACK);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement