// Why is this so horribly broken?
if (ogl_IsVersionGEQ(3,0))
{
- Fatal("We require OpenGL 3.1, but you have version %d.%d!",ogl_GetMajorVersion(), ogl_GetMinorVersion());
+ Error("We require OpenGL 3.1, but you have version %d.%d!",ogl_GetMajorVersion(), ogl_GetMinorVersion());
}
if (!SDL_GL_ExtensionSupported("GL_ARB_shading_language_420pack"))
{
- Fatal("Your system does not support the ARB_shading_language_420pack extension, which is required.");
+ Error("Your system does not support the ARB_shading_language_420pack extension, which is required.");
}
if (!SDL_GL_ExtensionSupported("GL_ARB_explicit_attrib_location"))
{
- Fatal("Your system does not support the ARB_explicit_attrib_location extension, which is required.");
+ Error("Your system does not support the ARB_explicit_attrib_location extension, which is required.");
}
m_frame_begin_time = SDL_GetPerformanceCounter();
PrepareRender();
if (m_buffer_dirty || m_bounds_dirty || !m_lazy_rendering) // object bounds have changed
- UpdateObjBoundsVBO(first_obj, last_obj);
+ {
+ if (m_use_gpu_rendering)
+ UpdateObjBoundsVBO(first_obj, last_obj);
+ }
if (m_use_gpu_transform)
{
{
Debug("Recreate buffers with %u objects", m_document.ObjectCount());
// Prepare bounds vbo
- m_bounds_ubo.Invalidate();
- m_bounds_ubo.SetType(GraphicsBuffer::BufferTypeUniform);
- m_bounds_ubo.SetUsage(GraphicsBuffer::BufferUsageStreamDraw);
- m_bounds_ubo.SetName("m_bounds_ubo: Screen bounds.");
+ if (UsingGPURendering())
+ {
+ m_bounds_ubo.Invalidate();
+ m_bounds_ubo.SetType(GraphicsBuffer::BufferTypeUniform);
+ m_bounds_ubo.SetUsage(GraphicsBuffer::BufferUsageStreamDraw);
+ m_bounds_ubo.SetName("m_bounds_ubo: Screen bounds.");
+ }
// Instead of having each ObjectRenderer go through the whole document
// we initialise them, go through the document once adding to the appropriate Renderers
//Debug("Object of type %d", type);
}
+
// Finish the buffers
for (unsigned i = 0; i < m_object_renderers.size(); ++i)
{
m_object_renderers[i]->FinaliseBuffers();
}
- dynamic_cast<BezierRenderer*>(m_object_renderers[BEZIER])->PrepareBezierGPUBuffer(m_document.m_objects);
+ if (UsingGPURendering())
+ dynamic_cast<BezierRenderer*>(m_object_renderers[BEZIER])->PrepareBezierGPUBuffer(m_document.m_objects);
m_render_dirty = false;
}