AnsweredAssumed Answered

Possible OpenGL bug : triple buffering + vsynch failure

Question asked by remnant on Mar 26, 2013
Latest reply on Mar 26, 2013 by remnant

Hi folks,


I've been pulling my hair out trying to solve a serious problem that I've encountered on AMD Radeon systems with my OpenGL application. After a lot of investigation I can distill the problem down to the following:


Test Environment:


*Windows 7 x64

*AMD Radeon HD 6800 series(although my users report problems with various additional other lines -- I suspect all Catalyst driver products)

*Catalyst version 13.1

*MSVC 2010 C++ MFC Framework application

*32 or 64bit applications

*In the CCC, turn on:


force vsynch

triple buffering


Without BOTH of these on, everything works fine. However, if both are turned on, the test application I've attached here cannot properly create a GL context; even though all the creation functions indicate success, wglMakeCurrent() returns false and the created context appears to be invalid when examined in GLDebugger. Again, with either turned off everything works just fine.


FURTHER, it seems that MFC is at least partly to blame, or at least exposes the issue. I created two testbed projects that are simply default MSVC 2010 new C++ projects. One was MFC based and the other Win32 based. Both give the main window a CS_OWNDC style (although this doesn't matter to the problem) and then attempt to initialize opengl during OnCreate.


In the straight Win32 testbed, there is no problem no matter what.. however the MFC testbed cannot initialize OpenGL in OnCreate when those two features above are active. OnCreate is the canonical place to initialize OpenGL so this is pretty concerning. However, I also found that if I delay created of the OpenGL resource context until the OnInitialUpdate, it will then work correctly.


I emphasize again that the example code works fine without both of the above turned on, and also works fine on other video cards.


I know I'm not the only one who has run into this, as I was googling for this issue and encountered multiple other devs scratching their heads on it. Anyone have any ideas, or know how to get a bug report to the driver team if it is indeed a bug? And of course, if anyone has an obvious dumb answer please shout