Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
7dd634fe
Commit
7dd634fe
authored
May 17, 2017
by
Martin Schultz
Browse files
added missing gl calls to fix GLErrors with QOpenGLWidget
parent
3a1d814a
Changes
1
Hide whitespace changes
Inline
Side-by-side
widgets/glWidget/QtBaseViewer.cc
View file @
7dd634fe
...
...
@@ -721,15 +721,12 @@ void glViewer::drawScene(double _aspect)
postproc_
->
resolveStereoAnyglyph
(
properties_
.
viewerId
());
// =================================================================================
glBindFramebuffer
(
GL_FRAMEBUFFER
,
backbufferFbo
);
glDrawBuffer
(
backbufferTarget
);
// unbind vbo for qt log window
ACG
::
GLState
::
bindBuffer
(
GL_ARRAY_BUFFER
,
0
);
ACG
::
GLState
::
activeTexture
(
GL_TEXTURE0
);
ACG
::
GLState
::
bindTexture
(
GL_TEXTURE_2D
,
0
);
// fbo.release();
//
// QRect blitRect(0,0,glstate_->viewport_width(),glstate_->viewport_height());
...
...
@@ -739,7 +736,6 @@ void glViewer::drawScene(double _aspect)
// //time.restart();
// QGLFramebufferObject::blitFramebuffer( 0 , blitRect, &fbo, blitRect , GL_COLOR_BUFFER_BIT );
// //std::cerr << "Elapsed for blit: " << time.elapsed() << std::endl;
glFinish
();
frame_time_
=
timer
.
elapsed
();
...
...
@@ -747,7 +743,6 @@ void glViewer::drawScene(double _aspect)
// Inside the glWidget rendering, the system should not send extra updates
properties_
.
blockSignals
(
false
);
}
...
...
@@ -921,7 +916,6 @@ void glViewer::home()
void
glViewer
::
viewAll
()
{
makeCurrent
();
// update scene graph (get new bounding box and set projection right, including near and far plane)
properties_
.
lockUpdate
();
...
...
@@ -996,7 +990,6 @@ void glViewer::initializeGL()
glstate_
->
translate
(
0.0
,
0.0
,
-
3.0
);
setHome
();
// pixel transfer
glPixelStorei
(
GL_UNPACK_ROW_LENGTH
,
0
);
glPixelStorei
(
GL_UNPACK_SKIP_ROWS
,
0
);
...
...
@@ -1020,7 +1013,6 @@ void glViewer::initializeGL()
ACG
::
SceneGraph
::
analyzeSceneGraph
(
sceneGraphRoot_
,
maxPases
,
bbmin
,
bbmax
);
sceneGraph
(
sceneGraphRoot_
,
maxPases
,
bbmin
,
bbmax
,
true
);
viewAll
();
}
}
...
...
@@ -1033,7 +1025,6 @@ void glViewer::paintGL(double _aspect)
{
if
(
!
initialized_
)
initializeGL
();
if
(
!
properties_
.
updateLocked
())
{
properties_
.
lockUpdate
();
...
...
@@ -1074,7 +1065,8 @@ void glViewer::paintGL(double _aspect)
glPopAttrib
();
}
glBindBuffer
(
GL_ARRAY_BUFFER
,
0
);
glBindBuffer
(
GL_ELEMENT_ARRAY_BUFFER
,
0
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment