Commit deb2ee91 authored by Martin Schultz's avatar Martin Schultz

added defaultVAO binding from QOpenGL branch

parent 37950e18
......@@ -1060,6 +1060,18 @@ void glViewer::paintGL(double _aspect)
{
if (!initialized_)
initializeGL ();
// some drivers in core profile require a VAO object to be bound for all buffer array operations
if (!glstate_->compatibilityProfile())
{
if (!defaultVAO_.isSupported())
std::cerr << "Error - using core profile, but required VAO is not supported!" << std::endl;
else
defaultVAO_.bind();
}
if (!properties_.updateLocked())
{
properties_.lockUpdate();
......
......@@ -620,6 +620,8 @@ private:
// Used to calculate the time passed between redraws
QTime redrawTime_;
// Default VAO needed in core profile mode
ACG::VertexArrayObject defaultVAO_;
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
// Get additional debug info from OpenGL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment