glGetError() returning "invalid operation" before I do anything...

Try one last thing, glClearColor(0.0, 0.0, 0.0, 0.0) just before the clear command in your render function.

Also, from where is your render function called? Within the mainloop, outside of normal Win32 loop?

If you want, email your code so I can look at it and I’ll find out what the problem might be.

It’s called from within the main loop, and the main loop is called from within WinMain.

Where is your call to glSwapBuffers???

And, just saw your earlier edit. No ICQ or AIM. Probably should one of these days…

[This message has been edited by shinpaughp (edited 03-15-2003).]

I wasn’t aware that I needed to call glSwapBuffers()…

That should fix it… Call glSwapBuffers(g_hdc); at end of your render function.

Let me know if that works.

Because you are using double buffers, you need to swap the buffers.

[This message has been edited by shinpaughp (edited 03-15-2003).]

error C2065: ‘glSwapBuffers’ : undeclared identifier

My bad.
no gl at beginning just

SwapBuffers(g_hdc);

Did it again. Read again, should be plural.

[This message has been edited by shinpaughp (edited 03-15-2003).]

Ah, there we go. That worked. Thanks!

Now to figure out how to get it not to use 100% CPU

All of my OpenGL applications run at 100% CPU. I haven’t figured out anything for that yet.

Glad I could help.

I found a fix, but it only works if you’re developing for Windows. As I plan to do my ports later, I’m not sure how this would apply to other OSes…

If you add a check in your main loop for whether the program is active or not, you can have it tell windows to idle until it recieves a message using WaitMessage();