PDA

View Full Version : OpenGL in MFC



infinitecmdz
09-07-2005, 09:53 AM
Hi,

I am a beginner in OpenGL and I am trying to learn Opengl with MFC. I have setup the opengl view class and all. I have created a dialog which will will get the vaules of x, y , z to translate and rotate. The problem is when I try it , it works perfectly well for the first translations in any axis. But the next time, when i pull down the dialog it does not work. The translation values come from the dialog and controls correctly and the values get correctly passed to the glTranslatef(), but there is no change in the rendering. I have called the InvalidateRect() for every change in the translation values and the OnDraw() does get called and the values do enter the functions to translate. But there is no change on the screen

Could anyone help me out on this..

Thank you

yours

siddharth

Hlz
09-08-2005, 06:10 PM
It sounds like you're having trouble with your MFC code. Try not to confuse an opengl problem with an MFC one. If you know how to apply transformations the way you want, then your trouble is likely with MFC DDE stuff within you dialog. That, or you're forgetting to clear your projection/modelview matrices with an identity or some such or another in a similar vein.

Hlz