MeVisLab Toolbox Reference
|
MeVis OpenGL Information Interface (Singleton) More...
#include <mlOpenGL.h>
Classes | |
struct | TypeInfo |
Struct to store infos about a type, e.g. about a uniform. More... | |
Static Public Member Functions | |
static bool | init () |
initialize the OpenGL information and GLEW, returns true if everything is ok More... | |
static const std::string & | getVendorString () |
get the open gl vendor string More... | |
static const std::string & | getRendererString () |
get the open gl driver string More... | |
static const std::string & | getVersionString () |
get the open gl version string More... | |
static bool | isMesaSoftwareRenderer () |
returns if the OpenGL driver is the Mesa software renderer (typically llvmpipe). More... | |
static bool | supports10Bit () |
returns if the OpenGL driver supports visible 10bit OpenGL contexts. More... | |
static bool | supportsRenderTo3DTexture () |
Returns if rendering to 3D textures is supported by FrameBufferObjects. More... | |
static bool | supportsPBO () |
Returns if PixelBufferObjects are supported. More... | |
static GLint | getVideoMemorySizeInMB () |
Returns the maximum available video memory size in MB. More... | |
static GLint | getMaxTextureSize () |
returns max 2d texture size (using GL_MAX_TEXTURE_SIZE) More... | |
static GLint | getMaxTextureSize3D () |
returns max 3d texture size (using GL_MAX_3D_TEXTURE_SIZE) More... | |
static GLint | getMaxTextureImageUnits () |
returns max available texture units (using GL_MAX_TEXTURE_IMAGE_UNITS) More... | |
static GLint | getMaxVertexAttributes () |
returns max available vertex attributes (using GL_MAX_VERTEX_ATTRIBS) More... | |
static GLint | getMaxVaryingFloats () |
returns max available varying floats ( using GL_MAX_VARYING_FLOATS ) More... | |
static GLint | getMaxSmoothLineWidth () |
returns max size of a supported smooth line width More... | |
static GLint | getMaxClipPlanes () |
returns max number of clip planes More... | |
static GLint | getMaxLights () |
returns max number of lights More... | |
static bool | isSupported (const char *extension) |
check if the given extension is supported More... | |
static void | clearTextureUnitsAndShaders () |
this method binds the 0 target to all texture units and ARB/GLSL shaders and it should be called in code that causes ATI OGL driver crashes when resources are freed in a shared context and have been previously bound in the original context (even if the state was popped afterwards) NOTE: needs a valid OpenGL context More... | |
static void | disableAllClipPlanes () |
disables all clip planes (needs a valid OpenGL context!) More... | |
static void | disableAllLights () |
disables all lights (needs a valid OpenGL context!) More... | |
static std::string | uniformTypeToString (GLenum type) |
Get uniform type as string. More... | |
static std::string | getUniformValue (GLint program, GLint uniform, GLenum type) |
Get uniform value as string. More... | |
static void | getActiveUniforms (GLuint program, std::vector< TypeInfo > &uniforms, bool withValues) |
Get the active uniforms from a shader. More... | |
static const char * | internalFormatToString (GLuint format) |
Returns the internal GL format as string;. More... | |
MeVis OpenGL Information Interface (Singleton)
MeVis OpenGL Information Interface (Singleton)
At MeVis we use the GLEW library, which is initialized in the init()
call of this class. In addition to the API provided by GLEW, this class has some additional methods that give information on the underlying OpenGL system. All methods of this class can be called WITHOUT having a valid OpenGL context, given that the init() method was called once at program startup. Projects that use the OpenGL API or extensions should typically specify
in their profile and include
This will also include the appropriate GLEW OpenGL header files.
Definition at line 58 of file mlOpenGL.h.
|
static |
this method binds the 0 target to all texture units and ARB/GLSL shaders and it should be called in code that causes ATI OGL driver crashes when resources are freed in a shared context and have been previously bound in the original context (even if the state was popped afterwards) NOTE: needs a valid OpenGL context
|
static |
disables all clip planes (needs a valid OpenGL context!)
|
static |
disables all lights (needs a valid OpenGL context!)
|
static |
Get the active uniforms from a shader.
|
static |
returns max number of clip planes
|
static |
returns max number of lights
|
static |
returns max size of a supported smooth line width
|
static |
returns max available texture units (using GL_MAX_TEXTURE_IMAGE_UNITS)
|
static |
returns max 2d texture size (using GL_MAX_TEXTURE_SIZE)
|
static |
returns max 3d texture size (using GL_MAX_3D_TEXTURE_SIZE)
|
static |
returns max available varying floats ( using GL_MAX_VARYING_FLOATS )
|
static |
returns max available vertex attributes (using GL_MAX_VERTEX_ATTRIBS)
|
static |
get the open gl driver string
|
static |
Get uniform value as string.
|
static |
get the open gl vendor string
|
static |
get the open gl version string
|
static |
Returns the maximum available video memory size in MB.
This tries to use OpenGL extensions to detect the size that is available for OpenGL and has a fallback to use OS routines to detect the size. On the Mesa Software Renderer, 512 MB are returned as default value, since the renderer is quite slow and it does not make sense to use a large amount of video memory.
|
static |
initialize the OpenGL information and GLEW, returns true if everything is ok
|
static |
Returns the internal GL format as string;.
|
inlinestatic |
returns if the OpenGL driver is the Mesa software renderer (typically llvmpipe).
Definition at line 74 of file mlOpenGL.h.
|
static |
check if the given extension is supported
|
inlinestatic |
returns if the OpenGL driver supports visible 10bit OpenGL contexts.
Definition at line 77 of file mlOpenGL.h.
|
static |
Returns if PixelBufferObjects are supported.
|
static |
Returns if rendering to 3D textures is supported by FrameBufferObjects.
|
static |
Get uniform type as string.