Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 336 vs 337 for /trunk/Source Code/Platform/Video/OpenGL/GLFWWrapper.cpp

Diff revisions: vs.
  @@ -23,7 +23,7 @@
23 23 glfwSetErrorCallback(GLUtil::glfw_error_callback);
24 24 // Attempt to init GLFW
25 25 if (!glfwInit()) {
26 - return GLFW_INIT_ERROR;
26 + return GLFW_INIT_ERROR;
27 27 }
28 28
29 29 #if defined(_DEBUG) || defined(_PROFILE) || defined(_GLDEBUG_IN_RELEASE)
  @@ -62,7 +62,7 @@
62 62 glfwWindowHint(GLFW_DEPTH_BITS, 24);
63 63
64 64 // Open an OpenGL window; resolution and windowed mode is specified in the external XML files
65 - GLUtil::_mainWindow = glfwCreateWindow(resolution.width,
65 + GLUtil::_mainWindow = glfwCreateWindow(resolution.width,
66 66 resolution.height,
67 67 par.getParam<stringImpl>("appTitle", "Divide").c_str(),
68 68 par.getParam<bool>("runtime.windowedMode", true) ? nullptr :
  @@ -127,19 +127,19 @@
127 127
128 128 // If we got here, let's figure out what capabilities we have available
129 129 // Maximum addressable texture image units in the fragment shader
130 - par.setParam<I32>("rendering.maxTextureSlots", GLUtil::getIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS));
130 + par.setParam<I32>("rendering.maxTextureSlots", GLUtil::getIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS));
131 131 // Maximum number of color attachments per framebuffer
132 - par.setParam<I32>("rendering.maxRenderTargetOutputs", GLUtil::getIntegerv(GL_MAX_COLOR_ATTACHMENTS));
132 + par.setParam<I32>("rendering.maxRenderTargetOutputs", GLUtil::getIntegerv(GL_MAX_COLOR_ATTACHMENTS));
133 133 // Query GPU vendor to enable/disable vendor specific features
134 134 stringImpl gpuVendorByte(reinterpret_cast<const char*>(glGetString(GL_VENDOR)));
135 135 if (!gpuVendorByte.empty()) {
136 136 if(gpuVendorByte.compare(0,5,"Intel") == 0) {
137 - GFX_DEVICE.setGPUVendor(GPU_VENDOR_INTEL);
138 - } else if (gpuVendorByte.compare(0, 6, "NVIDIA") == 0) {
139 - GFX_DEVICE.setGPUVendor(GPU_VENDOR_NVIDIA);
140 - } else if (gpuVendorByte.compare(0, 3, "ATI") == 0 || gpuVendorByte.compare(0, 3, "AMD") == 0) {
141 - GFX_DEVICE.setGPUVendor(GPU_VENDOR_AMD);
142 - }
137 + GFX_DEVICE.setGPUVendor(GPU_VENDOR_INTEL);
138 + } else if (gpuVendorByte.compare(0, 6, "NVIDIA") == 0) {
139 + GFX_DEVICE.setGPUVendor(GPU_VENDOR_NVIDIA);
140 + } else if (gpuVendorByte.compare(0, 3, "ATI") == 0 || gpuVendorByte.compare(0, 3, "AMD") == 0) {
141 + GFX_DEVICE.setGPUVendor(GPU_VENDOR_AMD);
142 + }
143 143 } else {
144 144 gpuVendorByte = "Unknown GPU Vendor";
145 145 GFX_DEVICE.setGPUVendor(GPU_VENDOR_OTHER);
  @@ -183,7 +183,7 @@
183 183 // How many attributes can we send to a vertex shader
184 184 PRINT_FN(Locale::get("GL_MAX_VERT_ATTRIB"),GLUtil::getIntegerv(GL_MAX_VERTEX_ATTRIBS));
185 185 // Maximum number of texture units we can address in shaders
186 - PRINT_FN(Locale::get("GL_MAX_TEX_UNITS"), GLUtil::getIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS),
186 + PRINT_FN(Locale::get("GL_MAX_TEX_UNITS"), GLUtil::getIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS),
187 187 par.getParam<I32>("rendering.maxTextureSlots", 16));
188 188 // Query shading language version support
189 189 PRINT_FN(Locale::get("GL_GLSL_SUPPORT"), glGetString(GL_SHADING_LANGUAGE_VERSION));
  @@ -297,18 +297,18 @@
297 297
298 298 // Once OpenGL is ready for rendering, init CEGUI
299 299 _enableCEGUIRendering = !(ParamHandler::getInstance().getParam<bool>("GUI.CEGUI.SkipRendering"));
300 - _GUIGLrenderer = &CEGUI::OpenGL3Renderer::create();
300 + _GUIGLrenderer = &CEGUI::OpenGL3Renderer::create();
301 301 _GUIGLrenderer->enableExtraStateSettings(par.getParam<bool>("GUI.CEGUI.ExtraStates"));
302 302 CEGUI::System::create(*_GUIGLrenderer);
303 303
304 - Application::getInstance().registerShutdownCallback( DELEGATE_BIND(&GLUtil::destroyGlew ) );
304 + Application::getInstance().registerShutdownCallback( DELEGATE_BIND(&GLUtil::destroyGlew ) );
305 305 return NO_ERR;
306 306 }
307 307
308 308 /// Clear everything that was setup in initRenderingApi()
309 309 void GL_API::closeRenderingApi() {
310 - CEGUI::OpenGL3Renderer::destroy(*_GUIGLrenderer);
311 - _GUIGLrenderer = nullptr;
310 + CEGUI::OpenGL3Renderer::destroy(*_GUIGLrenderer);
311 + _GUIGLrenderer = nullptr;
312 312 // Close the loading thread
313 313 _closeLoadingThread = true;
314 314 while ( GFX_DEVICE.loadingThreadAvailable() ) {
  @@ -387,7 +387,7 @@
387 387 std::this_thread::sleep_for(std::chrono::milliseconds(10));
388 388 }
389 389 }
390 - GLUtil::destroyGlew();
390 + GLUtil::destroyGlew();
391 391 // If we close the loading thread, update our atomic bool to make sure the application isn't using it anymore
392 392 GFX_DEVICE.loadingThreadAvailable(false);
393 393 }