git-svn-id: svn://db.shs.com.ru/libs@286 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -42,6 +42,9 @@ GLFramebuffer::~GLFramebuffer() {
|
||||
|
||||
void GLFramebuffer::resize(int width, int height, bool force) {
|
||||
if ((wid == width) && (hei == height) && !force) return;
|
||||
#if QT_VERSION >= 0x050600
|
||||
initializeOpenGLFunctions();
|
||||
#endif
|
||||
wid = width;
|
||||
hei = height;
|
||||
deleteGLFramebuffer(fbo);
|
||||
@@ -88,6 +91,9 @@ QImage GLFramebuffer::grab() const {
|
||||
void GLFramebuffer::bind() {
|
||||
if (is_changed) resize(wid, hei);
|
||||
if (fbo == 0) return;
|
||||
#if QT_VERSION >= 0x050600
|
||||
initializeOpenGLFunctions();
|
||||
#endif
|
||||
glFlush();
|
||||
glGetIntegerv(GL_VIEWPORT, prev_view);
|
||||
//glClearError();
|
||||
|
||||
Reference in New Issue
Block a user