Stupid stupid stupid OGL mistake

Spent like a whole day on a silly little display lists bug. So what happened was that I was building/compiling a display list in the constructor of my renderer class. It just turns out that this is not the best way of doing things. When I called to render the display list it kept throwing a “GL_INVALID_VALUE” error. Fixed this when I moved constructing the display list into the initialisation function. Hoooray. Now to find out why this actually happened. What’s special about the constructor of a C++ for the OGL api. Logic tells me that there is something I am missing here. Does the internet(s) have an answer?
BTW I got a crash when I was building mipmaps using gluBuild2DMipmaps inside the constructor.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s