22#pragma warning( push )
24#pragma warning(disable : 4251 )
142 const std::string&
aValue = std::string(),
143 const std::string&
aSize = std::string()) {
162 static GLint _videoMemorySizeInMB;
163 static GLint _maxGLTextureSize;
164 static GLint _maxGLTextureSize3D;
165 static GLint _maxTextureImageUnits;
166 static GLint _maxVertexAttributes;
167 static GLint _maxVaryingFloats;
168 static GLint _maxSmoothLineWidth;
169 static GLint _maxClipPlanes;
170 static GLint _maxLights;
171 static bool _supportsRenderTo3DTexture;
172 static bool _supports10Bit;
173 static bool _isMesaSoftwareRenderer;
175 static void queryCapabilities();
176 static void detect10BitCapability();
177 static void queryVideoMemorySize();
181 static bool hardwareSupports10BitContext();
183 static std::string getGLString(
int name);
185 static std::string _vendor;
186 static std::string _renderer;
187 static std::string _version;
194#pragma warning( pop )
MeVis OpenGL Information Interface (Singleton)
static bool supportsPBO()
Returns if PixelBufferObjects are supported.
static std::string uniformTypeToString(GLenum type)
Get uniform type as string.
static std::string getUniformValue(GLint program, GLint uniform, GLenum type)
Get uniform value as string.
static GLint getMaxLights()
returns max number of lights
static GLint getMaxSmoothLineWidth()
returns max size of a supported smooth line width
static void disableAllLights()
disables all lights (needs a valid OpenGL context!)
static GLint getMaxTextureImageUnits()
returns max available texture units (using GL_MAX_TEXTURE_IMAGE_UNITS)
static bool init()
initialize the OpenGL information and GLEW, returns true if everything is ok
static const std::string & getRendererString()
get the open gl driver string
static const char * internalFormatToString(GLuint format)
Returns the internal GL format as string;.
static void disableAllClipPlanes()
disables all clip planes (needs a valid OpenGL context!)
static bool supports10Bit()
returns if the OpenGL driver supports visible 10bit OpenGL contexts.
static GLint getVideoMemorySizeInMB()
Returns the maximum available video memory size in MB.
static GLint getMaxVertexAttributes()
returns max available vertex attributes (using GL_MAX_VERTEX_ATTRIBS)
static bool supportsRenderTo3DTexture()
Returns if rendering to 3D textures is supported by FrameBufferObjects.
static GLint getMaxClipPlanes()
returns max number of clip planes
static const std::string & getVersionString()
get the open gl version string
static GLint getMaxVaryingFloats()
returns max available varying floats ( using GL_MAX_VARYING_FLOATS )
static bool isMesaSoftwareRenderer()
returns if the OpenGL driver is the Mesa software renderer (typically llvmpipe).
static GLint getMaxTextureSize3D()
returns max 3d texture size (using GL_MAX_3D_TEXTURE_SIZE)
static bool isSupported(const char *extension)
check if the given extension is supported
static const std::string & getVendorString()
get the open gl vendor string
static GLint getMaxTextureSize()
returns max 2d texture size (using GL_MAX_TEXTURE_SIZE)
static void getActiveUniforms(GLuint program, std::vector< TypeInfo > &uniforms, bool withValues)
Get the active uniforms from a shader.
static void clearTextureUnitsAndShaders()
this method binds the 0 target to all texture units and ARB/GLSL shaders and it should be called in c...
#define ML_OPENGL_END_NAMESPACE
Closes the namespace for all ML stuff after the usage of ML_UTILS_START_NAMESPACE.
#define ML_OPENGL_START_NAMESPACE
Macro to put all following stuff into the namespace ML_NAMESPACE to avoid collisions with symbols of ...
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
Struct to store infos about a type, e.g. about a uniform.
TypeInfo(const std::string &aType, const std::string &aName, const std::string &aValue=std::string(), const std::string &aSize=std::string())