Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 795 vs 799 for /trunk/Source Code/Platform/Video/OpenGL/SDLWindowWrapper.cpp

Diff revisions: vs.
  @@ -151,15 +151,16 @@
151 151
152 152 // If we got here, let's figure out what capabilities we have available
153 153 // Maximum addressable texture image units in the fragment shader
154 - _maxTextureUnits = GLUtil::getIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS);
155 - _maxAttribBindings = GLUtil::getIntegerv(GL_MAX_VERTEX_ATTRIB_BINDINGS);
154 + s_maxTextureUnits = GLUtil::getIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS);
155 + s_maxAttribBindings = GLUtil::getIntegerv(GL_MAX_VERTEX_ATTRIB_BINDINGS);
156 + s_vaoBufferData.init(s_maxAttribBindings);
156 157
157 - assert(to_const_uint(AttribLocation::COUNT) < to_uint(_maxAttribBindings) &&
158 + assert(to_const_uint(AttribLocation::COUNT) < to_uint(s_maxAttribBindings) &&
158 159 "GL Wrapper: insufficient number of attribute binding locations available on current hardware!");
159 160
160 - Console::printfn(Locale::get(_ID("GL_MAX_TEX_UNITS_FRAG")), _maxTextureUnits);
161 + Console::printfn(Locale::get(_ID("GL_MAX_TEX_UNITS_FRAG")), s_maxTextureUnits);
161 162
162 - par.setParam<I32>(_ID("rendering.maxTextureSlots"), _maxTextureUnits);
163 + par.setParam<I32>(_ID("rendering.maxTextureSlots"), s_maxTextureUnits);
163 164 // Maximum number of colour attachments per framebuffer
164 165 par.setParam<I32>(_ID("rendering.maxRenderTargetOutputs"),
165 166 GLUtil::getIntegerv(GL_MAX_COLOR_ATTACHMENTS));
  @@ -327,7 +328,7 @@
327 328 // Initialize our VAO pool
328 329 GLUtil::_vaoPool.init(g_maxVAOS);
329 330 // We need a dummy VAO object for point rendering
330 - _dummyVAO = GLUtil::_vaoPool.allocate();
331 + s_dummyVAO = GLUtil::_vaoPool.allocate();
331 332
332 333 // In debug, we also have various performance counters to profile GPU rendering
333 334 // operations
  @@ -369,20 +370,20 @@
369 370 _GUIGLrenderer = nullptr;
370 371 // Destroy sampler objects
371 372 {
372 - WriteLock w_lock(_samplerMapLock);
373 - MemoryManager::DELETE_HASHMAP(_samplerMap);
373 + WriteLock w_lock(s_samplerMapLock);
374 + MemoryManager::DELETE_HASHMAP(s_samplerMap);
374 375 }
375 376 // Destroy the text rendering system
376 377 deleteFonsContext();
377 378 _fonts.clear();
378 379 // If we have an indirect draw buffer, delete it
379 - if (_indirectDrawBuffer > 0) {
380 - glDeleteBuffers(1, &_indirectDrawBuffer);
381 - _indirectDrawBuffer = 0;
382 - }
383 - if (_dummyVAO > 0) {
384 - glDeleteVertexArrays(1, &_dummyVAO);
385 - _dummyVAO = 0;
380 + if (s_indirectDrawBuffer > 0) {
381 + glDeleteBuffers(1, &s_indirectDrawBuffer);
382 + s_indirectDrawBuffer = 0;
383 + }
384 + if (s_dummyVAO > 0) {
385 + glDeleteVertexArrays(1, &s_dummyVAO);
386 + s_dummyVAO = 0;
386 387 }
387 388 glVertexArray::cleanup();
388 389 GLUtil::clearVBOs();