Browse Source

Merge branch 'master' into compatibility

Vladimír Vondruš 13 years ago
parent
commit
e9432370da
  1. 11
      src/Platform/magnum-info.cpp
  2. 10
      src/Shaders/compatibility.glsl

11
src/Platform/magnum-info.cpp

@ -49,8 +49,15 @@ MagnumInfo::MagnumInfo(const Arguments& arguments): Platform::WindowlessApplicat
Utility::Arguments args;
args.addBooleanOption("all-extensions")
.setHelp("all-extensions", "show extensions also for fully supported versions")
.setHelp("Displays information about Magnum engine and OpenGL capabilities.")
.parse(arguments.argc, arguments.argv);
.setHelp("Displays information about Magnum engine and OpenGL capabilities.");
/**
* @todo Make this work in NaCl, somehow the arguments aren't passed to
* constructor but to Init() or whatnot
*/
#ifndef CORRADE_TARGET_NACL
args.parse(arguments.argc, arguments.argv);
#endif
/* Create context after parsing arguments, so the help can be displayed
without creating context */

10
src/Shaders/compatibility.glsl

@ -37,6 +37,7 @@
#if defined(GL_ARB_shading_language_420pack)
#extension GL_ARB_shading_language_420pack: enable
#define EXPLICIT_TEXTURE_LAYER
#define RUNTIME_CONST
#endif
#ifdef GL_ARB_explicit_uniform_location
#extension GL_ARB_explicit_uniform_location: enable
@ -47,7 +48,8 @@
#if defined(GL_ES) && __VERSION__ >= 300
#define EXPLICIT_ATTRIB_LOCATION
/* EXPLICIT_TEXTURE_LAYER & EXPLICIT_UNIFORM_LOCATION is not available in OpenGL ES */
/* EXPLICIT_TEXTURE_LAYER, EXPLICIT_UNIFORM_LOCATION and RUNTIME_CONST is not
available in OpenGL ES */
#endif
/* Precision qualifiers are not supported in GLSL 1.20 */
@ -56,9 +58,3 @@
#define mediump
#define lowp
#endif
/* const qualifier can be used for readonly variables since GLSL 4.20, however
it's not supported even in ES 3.0 */
#if !defined(GL_ES) && __VERSION__ >= 420
#define RUNTIME_CONST
#endif

Loading…
Cancel
Save