hi,
i have problem with overpainting in qglwidget, when i create QPainter p(this) in paintG,L swapbuffers() dont work and my widget blinked during animation using updateGL and give me this error:
QOpenGlContext::swapBuffers called without corresponding makecurrent()
and when i using paintEvent() and i use update() i havent see smooth swap buffer too but if i dont use QPainter its work so good,
How can i use QPainter beside using swapbuffers()? do we have any function fer getting current context painter device?
this is my code
paintGL()
{
glClearColor(0,0,0,1);
glClear(GL_COLOR_BUFFER_BIT);
drawBackground(&p);
drawForeground();
}
paintGL()
{
glClearColor(0,0,0,1);
glClear(GL_COLOR_BUFFER_BIT);
QPainter p(this);
drawBackground(&p);
drawForeground();
}
To copy to clipboard, switch view to plain text mode
sorry for bad english and thanks.
Bookmarks