Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 736 vs 737 for /trunk/Source Code/Platform/Video/OpenGL/SDLWindowWrapper.cpp

Diff revisions: vs.
  @@ -23,6 +23,8 @@
23 23
24 24 namespace Divide {
25 25 namespace {
26 + const U32 g_maxVAOS = 512u;
27 +
26 28 class ContextPool {
27 29 public:
28 30 ContextPool()
  @@ -275,8 +277,10 @@
275 277
276 278 // Prepare immediate mode emulation rendering
277 279 NS_GLIM::glim.SetVertexAttribLocation(to_const_uint(AttribLocation::VERTEX_POSITION));
280 + // Initialize our VAO pool
281 + GLUtil::_vaoPool.init(g_maxVAOS);
278 282 // We need a dummy VAO object for point rendering
279 - glCreateVertexArrays(1, &_dummyVAO);
283 + _dummyVAO = GLUtil::_vaoPool.allocate();
280 284
281 285 // In debug, we also have various performance counters to profile GPU rendering
282 286 // operations
  @@ -349,6 +353,8 @@
349 353 }
350 354 glVertexArray::cleanup();
351 355 GLUtil::clearVBOs();
356 + GLUtil::_vaoPool.destroy();
357 +
352 358 destroyGLContext();
353 359 }
354 360