alex wrote:
> Hi Folks
> 
> I am trying to use OpenSG 2.0 with MFC but device creation is fail, I tried 
> to debug it and found wglMakeCurrent function is failed to set current 
> context. I know basics of OpenGL for device creations.  I had also changed 
> style of dialog with adding CS_OWNDC in style.
> 
> If i removing ReleaseDC from library then device creation is fine. Basically 
> it only work once when wglCreateContext called.
> 
> Any idea why ?

I don't understand exactly how your code works, but wglCreateContext 
must be called if any wglMakeCurrent call is to succeed. (You need an 
OpenGL context for the entire lifetime of the OpenGL window)

ReleaseDC shouldn't be called until you are closing the window. Doing it 
before probably releases the glcontext as well, making wglMakeCurrent fail.

Cheers,
/Marcus


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to