OpenGL

This object is passed around to other OpenGL wrapper objects to ensure library loading. Create one to use OpenGL.

Constructors

this
this(Logger logger)

Load OpenGL library, redirect debug output to our logger. You can pass a null logger if you don't want logging.

Destructor

~this
~this()
Undocumented in source.

Members

Enums

Vendor
enum Vendor
Undocumented in source.

Functions

close
void close()

Releases the OpenGL dynamic library. All resources should have been released at this point, since you won't be able to call any OpenGL function afterwards.

debugCheck
void debugCheck()

Check for pending OpenGL errors, log a message if there is. Only for debug purpose since this check will be disabled in a release build.

getExtensions
string[] getExtensions()
getExtensionsString
deprecated string getExtensionsString()
getFloat
float getFloat(GLenum pname)
getFloat
float getFloat(GLenum pname, GLfloat defaultValue, bool logging)
getGLSLVersionString
string getGLSLVersionString()
getInteger
bool getInteger(GLenum pname, int result)

Calls glGetIntegerv and gives back the requested integer.

getInteger
int getInteger(GLenum pname, GLint defaultValue, bool logging)
getMajorVersion
int getMajorVersion()
getMinorVersion
int getMinorVersion()
getRendererString
string getRendererString()
getString
string getString(GLenum name)
getString
string getString(GLenum name, GLuint index)
getVendor
Vendor getVendor()

Tries to detect the driver maker.

getVendorString
string getVendorString()
getVersionString
string getVersionString()
maxColorAttachments
int maxColorAttachments()
maxCombinedImageUnits
int maxCombinedImageUnits()
maxFragmentTextureImageUnits
int maxFragmentTextureImageUnits()
maxTextureMaxAnisotropy
float maxTextureMaxAnisotropy()
maxTextureSize
int maxTextureSize()
maxTextureUnits
int maxTextureUnits()
maxVertexImageUnits
int maxVertexImageUnits()
reload
void reload()

Reload OpenGL function pointers. Once a first OpenGL context has been created, you should call reload() to get the context you want.

runtimeCheck
void runtimeCheck()

Checks pending OpenGL errors.

runtimeCheckNothrow
bool runtimeCheckNothrow()

Checks pending OpenGL errors.

supportsExtension
bool supportsExtension(string extension)
textureUnits
TextureUnits textureUnits()

Static functions

getErrorString
string getErrorString(GLint r)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_logger
Logger _logger;
Undocumented in source.

Meta