Hi, I am learning OpenGL and I am trying to make an object I created cross a 2D grid. Using glTranslate I have figured out how to move the entire image, but how would I say move my object ( Which is a GL quad)?
Code:
for(int i=-0; i<10;i+=10)
{
glBegin(GL_QUADS);
glVertex2f(-5.0f,i);
glVertex2f(i,5.0f);
glVertex2f(5.0f,i);
glVertex2f(i,-5.0f);
glEnd();
}
for(int i=-500; i<500; i+=30)
{
glBegin(GL_LINES);
glVertex2f(600.0f,i); //much simpler than all of that .........
glVertex2f(-600.0f,i);
glVertex2f(i,600.0f);
glVertex2f(i,-600.0f);
glEnd();
}
drawFont("Test Blue");
Mod Edit: Added code tags.