24#pragma warning(disable \
34ML_OPENGL_START_NAMESPACE
82 return _isMesaSoftwareRenderer;
88 return _supports10Bit;
154 TypeInfo(
const std::string& aType,
const std::string& aName,
const std::string& aValue = std::string(),
155 const std::string& aSize = std::string())
159 this->
value = aValue;
169 static void getActiveUniforms(GLuint program, std::vector<TypeInfo>& uniforms,
bool withValues);
175 static GLint _videoMemorySizeInMB;
176 static GLint _maxGLTextureSize;
177 static GLint _maxGLTextureSize3D;
178 static GLint _maxTextureImageUnits;
179 static GLint _maxVertexAttributes;
180 static GLint _maxVaryingFloats;
181 static GLint _maxSmoothLineWidth;
182 static GLint _maxClipPlanes;
183 static GLint _maxLights;
184 static bool _supportsRenderTo3DTexture;
185 static bool _supports10Bit;
186 static bool _isMesaSoftwareRenderer;
190 static void queryCapabilities();
191 static void detect10BitCapability();
192 static void queryVideoMemorySize();
196 static bool hardwareSupports10BitContext();
198 static std::string getGLString(
int name);
200 static std::string _vendor;
201 static std::string _renderer;
202 static std::string _version;
205ML_OPENGL_END_NAMESPACE
MeVis OpenGL Information Interface (Singleton).
static bool isSupported(const char *extension)
Checks whether the given extension is supported.
static GLint getMaxClipPlanes()
Returns the maximum number of clip planes.
static bool supportsRenderTo3DTexture()
Returns whether rendering to 3D textures is supported by FrameBufferObjects.
static const char * internalFormatToString(GLuint format)
Returns the internal GL format as string;.
static bool initWithExternalContext()
static GLint getVideoMemorySizeInMB()
static const std::string & getVendorString()
Returns the OpenGL vendor string.
static void disableAllClipPlanes()
Disables all clip planes (needs a valid OpenGL context!).
static bool isMesaSoftwareRenderer()
Returns whether the OpenGL driver is the Mesa software renderer (typically llvmpipe).
static GLint getMaxTextureSize()
Returns the maximum 2D texture size (using GL_MAX_TEXTURE_SIZE).
static void getActiveUniforms(GLuint program, std::vector< TypeInfo > &uniforms, bool withValues)
Returns the active uniforms from a shader.
static GLint getMaxLights()
Returns the maximum number of lights.
static GLint getMaxTextureImageUnits()
Returns the maximum available texture units (using GL_MAX_TEXTURE_IMAGE_UNITS).
static std::string getUniformValue(GLint program, GLint uniform, GLenum type)
Returns the uniform value as string.
static GLint getMaxVertexAttributes()
Returns the maximum available vertex attributes (using GL_MAX_VERTEX_ATTRIBS).
static bool supportsPBO()
Returns whether PixelBufferObjects are supported.
static GLint getMaxTextureSize3D()
Returns the maximum 3D texture size (using GL_MAX_3D_TEXTURE_SIZE).
static std::string uniformTypeToString(GLenum type)
Returns the uniform type as string.
static GLint getMaxVaryingFloats()
Returns the maximum available varying floats (using GL_MAX_VARYING_FLOATS).
static void disableAllLights()
Disables all lights (needs a valid OpenGL context!).
static bool supports10Bit()
Returns whether the OpenGL driver supports visible 10-bit OpenGL contexts.
static const std::string & getVersionString()
Return the OpenGL version string.
static GLint getMaxSmoothLineWidth()
Returns the maximum size of a supported smooth line width.
static void clearTextureUnitsAndShaders()
static const std::string & getRendererString()
Returns the OpenGL driver string.
#define MLOPENGL_EXPORT
Closes the namespace for all ML code after the usage of ML_UTILS_START_NAMESPACE.
TypeInfo(const std::string &aType, const std::string &aName, const std::string &aValue=std::string(), const std::string &aSize=std::string())