I am using JOGL with OpenGL. I am drawing everything through display lists. How do I make the contents Specify, I'm trying to find out.
I'm looking at it. The following looks very simple:
glPushMatrix (); GlTranslatef (-1.25, 3.0, 0.0); GlMaterialfv (GL_FRONT, GL_AMBIIT, NO_mat); Glomeriarif (GL_Front, GLDIFIFEE, MAT_DIFUGE); GlMaterialfv (GL_FRONT, GL_SPECULAR, MatspecLar); GlMaterialfv (GL_FRONT, GLIHINIININSE, low_centry); GlMaterialfv (GL_FRONT, GL_EMISSION, no_mat); AuxSolidSphere (); GlPopMatrix ();
How can I do this with a display list? Without them, my app is very slow.
glMaterial
in your display list
int displayList = glGenLists (1); GlNewList (display list, GL_COMPILE); Floatbuffer environment = buffutty Kitterflot Buffer (4); Ambient.put (1.0f); // Red Surround. (0.0F) interpreter; // green environment (0.5 f) input; // blue surroundings (1.0 F) input; // alpha environment Flip (); // can now read OpenGL buffer glomeratric (GL_Front, GL_AMBITIT, environment); // put other content properties here // put glVertex / glColor call here glEndList ();
Comments
Post a Comment