opengl - changing GLUT calls to work with MFC/C++ -


I have a program that uses GLUT for its Open Gall rendering. Now I need to be inside the MFC project so that it can work with other program components.

I have followed this tutorial:

I am calling a function which was a GLTUT display callback in the title of the title, but it is not working because the rendering depends on some GLUT's inactive callback I do not understand where I want the GLUTTUT disable callback in my MFC program. Should I make a separate event handler for this, and if so, what is the event? Or am I doing something completely wrong? I am quite familiar with OpenGL, but this is my first experience with MFC, so I am probably sinner on that side.

Thank you very much for your time; I really appreciate it!

I've browsed the tutorial you linked; On page 2, something can be found with the following lines (I have cleared the code a little bit):

  Zero Konogenel Control :: Ownimer (UINT NIDIT) {If (NIDITOR = = 1) {GlClear (GL_COLOR_BUFFER_BIT | GL_Depath_BUFFER_BIT); OglDrawScene (); // Try to include your useless function code here; SwapBuffers (HDC); } CWND :: Ontimer (NIDIT); }  

So, it is basically a replacement for the glutIdleFunc recommended by this tutorial. Before attempting to call, before attempting to call SwapBuffers , I try to include the code I call in my passive function.

I hope that helps


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -