OpenGL square not showing up..
Hi, so im new to graphics programming and decided to try openGL (I'm planning on making a 2D game in it at first, possibly pacman). And I'm having trouble getting it to draw shapes on the screen.
#define WIDTH 350
#define HEIGHT 500
glClearColor(1.0, 0.0, 0.0, 1.0);
glTranslatef(0.0, 0.0, -5.0);
glVertex3f(-1.0f, -1.0f, 0.0f);
glVertex3f(-1.0f, 1.0f, 0.0f);
glVertex3f(1.0f, 1.0f, 0.0f);
glVertex3f(1.0f, -1.0f, 0.0f);
int main(int argc, char **argv)
also once i get to the point of coding a pacman game.. would the best method be to use and array to represent a tile like system to draw the game boards, and to be used with the ghost AI