pl01
30th April 2013, 14:43
Hi,
I'm using the WGLWidget under windows 7 64 bits and when I call "wglGetCurrentDC" from the "resizeEvent" I got another value than from the "paintEvent" !
Also, I have checked and it is the same thread !
How is it possible ?
Here is some code :
void GLViewport::resizeEvent(QResizeEvent* e)
{
if (_isInitialized)
return;
glInit();
_win32HDC = wglGetCurrentDC();
}
void GLViewport::paintEvent(QPaintEvent *)
{
_win32HDC = wglGetCurrentDC();
}
I'm using the WGLWidget under windows 7 64 bits and when I call "wglGetCurrentDC" from the "resizeEvent" I got another value than from the "paintEvent" !
Also, I have checked and it is the same thread !
How is it possible ?
Here is some code :
void GLViewport::resizeEvent(QResizeEvent* e)
{
if (_isInitialized)
return;
glInit();
_win32HDC = wglGetCurrentDC();
}
void GLViewport::paintEvent(QPaintEvent *)
{
_win32HDC = wglGetCurrentDC();
}