I am trying to initialize my OGL stuff from within the InitInstance function of a DLL I've created. Is this allowed?
Here's my situation:
I am using FBOs. What happens is the call to glGenFramebuffers succeeds, but then glBindFramebuffers hangs indefinitely - it never returns, CPU is inactive.
When I execute the same code in an exported function of the DLL, everything is ok, but I'd much prefer to do it in InitInstance. I know the correct contexts are current when these calls are made.
I load the DLL dynamically into a console app, create a window or display, then use that window's handle for my OGL init. All works if I init from within that console app.
I'm not really new to OGL, but this is something I've never tried before, and can't find anything written about this scenario, or specifically about initializing FBOs from a DLL.
Would really appreciate any advice!