Skip to content
Snippets Groups Projects
Commit deb2ee91 authored by Martin Schultz's avatar Martin Schultz
Browse files

added defaultVAO binding from QOpenGL branch

parent 37950e18
Branches
Tags
2 merge requests!65Feature core profile,!41Fix core profile incompatibility
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment