Are you tied to using windows API? If yes then you can disregard the rest of this reply since I don't have an answer to your Windows specific question. But if you are open to a powerful alternative ...

I have found that learning openGL with the GLUT library is much more rewarding. As you get more into openGL you will see that many many examples in the community exist with GLUT as the basis (for instance see openGL/GLUT examples (http://www.opengl.org/code/category/C19) ). And since you are using dev-cpp you even have a devpak available for easy starting with GLUT -- see dev-cpp and GLUT (http://www.astahost.com/info.php/Installing-Glut-Dev_t14192.html) or an Alternative (http://www.onecore.net/dev-c-opengl.htm). You can use its installed GLUT template to get a compiled and running openGL window simply too :)

Compare your windows code against a minimal code to open a working openGL window and draw a complicated famous 3d teapot -- the GLUT code is cleaner and less cluttered:

A good beginning but detailed tutorial can found at Lighthouse3D tutorials (http://www.lighthouse3d.com/opengl/glut/index.php?1). Consider this to be a week or two of good reading and experimenting to get into openGL but it is well worth the effort. There are multiple zip files as you read along -- you don't need the VC specific stuff, just the *.c/*.cpp files copied into your dev-cpp template cpp-file and using the standard GLUT library options everything will compile fine in dev-cpp.

orca188

09-12-2009, 04:42 AM

thank you marshats ,you are wonderfull

marshats

09-12-2009, 10:14 AM

glad to help. I hope you find GLUT library as helpful as I have. It really is a nice tool to start learning openGL from.