View Full Version : HELP!!! with the Simple 2D Maze

09-20-2000, 04:52 AM
I have to write a program for a simple 2D Maze in OpenGL. I can't figure out where to start. Can anyone please help me???
I don't know what should I do first; draw a polygon, or draw a matrix, or do i have to use any data structures here like push/pop???

09-20-2000, 06:00 AM
Start by doing the normal 2D initialisations: create your window, use gluOrtho2D to get your 2D environment initialised. Next do all of your enables and disables (for this case you probably don't need any), set up a background colour, then you are ready to start drawing.
Load your maze in whatever format you want, the use glBegin (GL_LINES); to start drawing your maze, set your foreground colour to whatever colour you want your walls to be and start specifying points with glVertex2f
then all you need is a glEnd (); and you should have a pretty drawing. http://www.opengl.org/discussion_boards/ubb/biggrin.gif