Original Post
Ok, first, my main question is...
Can I have a look inside the glBegin() and glEnd() functions?
For example
glBegin(GL_POINTS);
for (int counter = 0; counter < array.length(); counter++)
glVertex3f(ArrayX[counter], ArrayY[counter], 0.0f);
glEnd;
and my second question...
I am using the basic shell from nehe''s first tutorial, and the only thing I''m changing is the DrawGLScene function. my code is below. My question is, how could I make this faster?
int DrawGLScene(GLvoid) // Here''s Where We Do All The Drawing
{
int newx = radius * cos(ConvertDegreesToRadians(angle)) + centerx;
int newy = radius * sin(ConvertDegreesToRadians(angle-1.570795)) + centery;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer
glLoadIdentity(); // Reset The Current Modelview Matrix
glTranslatef( -5.0f, 3.75f, -9.03f ); // Move Left 1.5 Units And Into The Screen 6.0
glBegin(GL_LINES); // Drawing Using Points
glVertex3f(CONV_X float(centerx), CONV_Y float(centery), 0.0f);
glVertex3f(CONV_X float(newx), CONV_Y float(newy), 0.0f);
glEnd();
angle++;
if(angle == 360)
angle = 0;
return TRUE; // Everything Went OK
}