Quad isn't rendering

I’ve learnt a bit of OpenGL using java. Now I’m trying to transition to C++. I’m trying to setup a window and render a quad, but its not showing up. I just get a black screen. I’m using an example from the OpenGL Superbible as a start.

Here is my code: http://pastebin.com/p8Qz7ANh

I’m pretty sure all the window setup stuff is working. If i change the glClearColor, the windows color changes.

glGetError gives me “invalid operation” on glColor4f and glBegin…glEnd if I’m using an opengl 3.3 rendering context. However there is no error if i use any version < 3.2. I’m not sure why. Either way, the quad isn’t being drawn.

I hope someone can see what’s wrong with it. Thanks.

Ok i figured out the problem.

  1. quads don’t seem to work with opengl 3.3
  2. im drawing the quads behind the camera lol…

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.