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()
getFloat
float getFloat(GLenum pname)
getGLSLVersionString
const(char)[] getGLSLVersionString()
getInteger
int getInteger(GLenum pname)

Calls glGetIntegerv and gives back the requested integer.

getMajorVersion
int getMajorVersion()
getMinorVersion
int getMinorVersion()
getRendererString
const(char)[] getRendererString()
getString
const(char)[] getString(GLenum name)
getString
const(char)[] getString(GLenum name, GLuint index)
getVendor
Vendor getVendor()

Tries to detect the driver maker.

getVendorString
const(char)[] getVendorString()
getVersionString
const(char)[] getVersionString()
maxColorAttachments
int maxColorAttachments()
redirectDebugOutput
void redirectDebugOutput()

Redirects OpenGL debug output to the Logger. You still has to use glDebugMessageControl to set which messages are emitted. For example, to enable all messages, use: glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, null, GL_TRUE);

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.

setActiveTexture
void setActiveTexture(int texture)

Sets the "active texture" which is more precisely active texture unit.

supportsExtension
bool supportsExtension(string extension)

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