is it valid to obtain a device context handle from a window handle if the window already initialized direct draw and switched to fullscreen mode?
The reason why i ask is because
wglCreateContext always returns an invalid handle error code.
First i thougt it’s because i already initialized directdraw and i obtained the device context handle by GetDC(HandleOfDirecDrawWindow); so i tried to initialize opengl before direct draw. (without success - still invalid handle returned). Next thing i thought was maybe i can not obtain a device context from that window so i tried to use CreateDC to obtain a handle to a divice context. But wglCreateContext still complains that the handle is invalid…
The strange thing is, ChoosePixelFormat() and SetPixelFormat() accepted the divce context handle. (regardless how it was obtained)
An other question is, i’ve read that opengl can not render directly onto a direct draw surface - at least not on every system. Is this still the case? And on what does it depend if it works or not? I just wonder why there’s a funktion called GetDC in the DirectDrawSurface class.
Whats the usual way to get direct draw and opengl working in the same program? And how do i get the rendered image onto a direct draw surface - FAST?
i’d better RTFM alot - Let me know where if you know any good sources of whisdom.
Thank’s in advance for any hints,