Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 826 vs 827 for /trunk/Source Code/Platform/Video/OpenGL/SDLWindowWrapper.cpp

Diff revisions: vs.
  @@ -5,6 +5,7 @@
5 5 #include "Core/Headers/ParamHandler.h"
6 6 #include "Platform/Video/Headers/GFXDevice.h"
7 7 #include "Platform/Video/OpenGL/Buffers/Headers/glMemoryManager.h"
8 + #include "Platform/Video/OpenGL/Buffers/ShaderBuffer/Headers/glUniformBuffer.h"
8 9 #include "Platform/Video/OpenGL/Buffers/VertexBuffer/Headers/glVertexArray.h"
9 10
10 11 #ifndef CEGUI_STATIC
  @@ -162,7 +163,6 @@
162 163
163 164 Console::printfn(Locale::get(_ID("GL_MAX_TEX_UNITS_FRAG")), s_maxTextureUnits);
164 165
165 - par.setParam<I32>(_ID("rendering.maxTextureSlots"), s_maxTextureUnits);
166 166 // Maximum number of colour attachments per framebuffer
167 167 par.setParam<I32>(_ID("rendering.maxRenderTargetOutputs"),
168 168 GLUtil::getIntegerv(GL_MAX_COLOR_ATTACHMENTS));
  @@ -259,7 +259,7 @@
259 259 // Maximum number of texture units we can address in shaders
260 260 Console::printfn(Locale::get(_ID("GL_MAX_TEX_UNITS")),
261 261 GLUtil::getIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS),
262 - par.getParam<I32>(_ID("rendering.maxTextureSlots"), 16));
262 + GL_API::s_maxTextureUnits);
263 263 // Query shading language version support
264 264 Console::printfn(Locale::get(_ID("GL_GLSL_SUPPORT")),
265 265 glGetString(GL_SHADING_LANGUAGE_VERSION));
  @@ -269,15 +269,12 @@
269 269 // In order: Maximum number of uniform buffer binding points,
270 270 // maximum size in basic machine units of a uniform block and
271 271 // minimum required alignment for uniform buffer sizes and offset
272 - GLint uboffset = GLUtil::getIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT);
273 - GLint uboSize = GLUtil::getIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE);
272 + GL_API::s_UBOffsetAlignment = GLUtil::getIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT);
273 + GL_API::s_UBMaxSize = GLUtil::getIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE);
274 274 Console::printfn(Locale::get(_ID("GL_UBO_INFO")),
275 275 GLUtil::getIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS),
276 - uboSize / 1024,
277 - uboffset);
278 - par.setParam<I32>(_ID("rendering.UBOAligment"), uboffset);
279 - par.setParam<U32>(_ID("rendering.UBOSize"), to_uint(uboSize));
280 - par.setParam<I32>(_ID("rendering.UBOMaxSize"), uboSize);
276 + GL_API::s_UBMaxSize / 1024,
277 + GL_API::s_UBOffsetAlignment);
281 278
282 279 // In order: Maximum number of shader storage buffer binding points,
283 280 // maximum size in basic machine units of a shader storage block,
  @@ -285,16 +282,15 @@
285 282 // be accessed by all active shaders and
286 283 // minimum required alignment for shader storage buffer sizes and
287 284 // offset.
288 - GLint sboffset = GLUtil::getIntegerv(GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT);
289 - GLint maxSSBOSize = GLUtil::getIntegerv(GL_MAX_SHADER_STORAGE_BLOCK_SIZE);
285 + GL_API::s_SSBOffsetAlignment = GLUtil::getIntegerv(GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT);
286 + GL_API::s_SSBMaxSize = GLUtil::getIntegerv(GL_MAX_SHADER_STORAGE_BLOCK_SIZE);
290 287 Console::printfn(
291 288 Locale::get(_ID("GL_SSBO_INFO")),
292 289 GLUtil::getIntegerv(GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS),
293 290 (GLUtil::getIntegerv(GL_MAX_SHADER_STORAGE_BLOCK_SIZE) / 1024) / 1024,
294 291 GLUtil::getIntegerv(GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS),
295 - sboffset);
296 - par.setParam<I32>(_ID("rendering.SSBOAligment"), sboffset);
297 - par.setParam<I32>(_ID("rendering.SSBOMaxSize"), maxSSBOSize);
292 + GL_API::s_SSBOffsetAlignment);
293 +
298 294 // Maximum number of subroutines and maximum number of subroutine uniform
299 295 // locations usable in a shader
300 296 Console::printfn(Locale::get(_ID("GL_SUBROUTINE_INFO")),
  @@ -310,9 +306,9 @@
310 306 // Line smoothing should almost always be used
311 307 if (Config::USE_HARDWARE_AA_LINES) {
312 308 glEnable(GL_LINE_SMOOTH);
313 - glGetIntegerv(GL_SMOOTH_LINE_WIDTH_RANGE, &_lineWidthLimit);
309 + glGetIntegerv(GL_SMOOTH_LINE_WIDTH_RANGE, &s_lineWidthLimit);
314 310 } else {
315 - glGetIntegerv(GL_ALIASED_LINE_WIDTH_RANGE, &_lineWidthLimit);
311 + glGetIntegerv(GL_ALIASED_LINE_WIDTH_RANGE, &s_lineWidthLimit);
316 312 }
317 313
318 314 // Culling is enabled by default, but RenderStateBlocks can toggle it on a
  @@ -329,6 +325,8 @@
329 325 NS_GLIM::glim.SetVertexAttribLocation(to_const_uint(AttribLocation::VERTEX_POSITION));
330 326 // Initialize our VAO pool
331 327 GLUtil::_vaoPool.init(g_maxVAOS);
328 + // Initialize shader buffers
329 + glUniformBuffer::onGLInit();
332 330 // We need a dummy VAO object for point rendering
333 331 s_dummyVAO = GLUtil::_vaoPool.allocate();
334 332