News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Really simple OpenGL Question..

Started by travism, January 08, 2009, 04:48:59 AM

Previous topic - Next topic

travism

Im just getting started with opengl and asm and every example I see they arn't using a dialog box for the main window, So I was wondering if you could still use a dialog box for the main window with opengl or if you have to use it using createwindow? I know it might seem like a stupid question. Sorry :\

zooba

OpenGL requires that the device context (DC) of a window does not change over its lifetime. Normally, Windows has a pool of DCs that are shared as required, so different windows may at times (not the same time) have the same DC.

To ensure that you window has its own DC, you need to specify CS_OWNDC when you register the class (RegisterClassEx). As far as I know, it is not possible to do this using dialogs.

Cheers,

Zooba :U

travism

Oh wow great reply, Thank you for the info!