summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2010-12-02 18:47:21 +0100
committerGunnar Sletta <gunnar.sletta@nokia.com>2010-12-02 18:47:21 +0100
commit8184918371035047cea1d42e949d6b5573ef1af5 (patch)
tree72e632ba3b0e34acd928db0fe8d234a6b6f9b4f5
parentabe3729e04e1427f5e16177b476a6aae8eba3e8f (diff)
Move initializeGLFunctions() into the constructor.
We can do this now that we know that there is a GL context when the renderer is created.
-rw-r--r--src/scenegraph/coreapi/renderer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scenegraph/coreapi/renderer.cpp b/src/scenegraph/coreapi/renderer.cpp
index a3d2feb..79a5fcd 100644
--- a/src/scenegraph/coreapi/renderer.cpp
+++ b/src/scenegraph/coreapi/renderer.cpp
@@ -70,6 +70,8 @@ Renderer::Renderer()
, m_root_node(0)
, m_changed_emitted(false)
{
+ Q_ASSERT(QGLContext::currentContext());
+ initializeGLFunctions();
}
Renderer::~Renderer()
@@ -111,8 +113,6 @@ void Renderer::renderScene(const Bindable &bindable)
if (!m_root_node)
return;
- initializeGLFunctions();
-
preprocess();
bindable.bind();
GeometryDataUploader::bind();