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()

Unload the OpenGL library.

Members

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.

getExtensionsStrings
string[] getExtensionsStrings()
getFloat
float getFloat(GLenum pname)
getFloat
float getFloat(GLenum pname, GLfloat defaultValue, bool logging)
getGLSLVersionString
string getGLSLVersionString()
getInteger
bool getInteger(GLenum pname, out int result, string file = __FILE__, int line = __LINE__)

Calls glGetIntegerv and gives back the requested integer.

getInteger
int getInteger(GLenum pname, GLint defaultValue, bool logging, string file = __FILE__, int line = __LINE__)
getRendererString
string getRendererString()
getString
string getString(GLenum name)
getStrings
string[] getStrings(GLenum pname, int numStrings)
getVendor
Vendor getVendor()

Tries to detect the driver maker.

getVendorString
string getVendorString()
getVersionString
string getVersionString()
logGLLeaks
void logGLLeaks()

Assume any existing OpenGL objects are leaks and write them into the log.

maxColorAttachments
int maxColorAttachments()
maxCombinedImageUnits
int maxCombinedImageUnits()
maxFragmentTextureImageUnits
int maxFragmentTextureImageUnits()
maxTextureMaxAnisotropy
float maxTextureMaxAnisotropy()
maxTextureSize
int maxTextureSize()
maxTextureUnits
int maxTextureUnits()
maxVertexImageUnits
int maxVertexImageUnits()
reload
GLVersion reload()

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

runtimeCheck
bool runtimeCheck(string file = __FILE__, int line = __LINE__)

Checks pending OpenGL errors.

sanitizeGLString
string sanitizeGLString(const(char)* sZ)

Sanitize a GL string returned by glGetString/glGetStringi.

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

Meta