GLBackend

Constructors

this
this()

Load OpenGL library.

Members

Functions

activeTexture
void activeTexture(int texture_id)

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

clear
void clear()
clearColor
void clearColor(float r, float g, float b, float a)
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.

extensions
string[] extensions()

Returns a slice made up of available extension names.

getFloat
float getFloat(GLenum pname)

Returns the requested float returned by glGetFloatv.

getInt
int getInt(GLenum pname)

Returns the requested int returned by glGetFloatv.

getString
const(char)[] getString(GLenum name)

Returns OpenGL string returned by glGetString.

getString
const(char)[] getString(GLenum name, GLuint index)

Returns OpenGL string returned by glGetStringi.

glslVersionString
const(char)[] glslVersionString()

Returns GLSL version string.

graphicsEngineString
const(char)[] graphicsEngineString()

Returns the name of the renderer. This name is typically specific to a particular configuration of a hardware platform.

majorVersion
int majorVersion()

Returns OpenGL major version.

maxColorAttachments
int maxColorAttachments()

Returns the maximum number of color attachments. This is the number of targets a fragment shader can output to. You can rely on this number being at least 4 if MRT is supported.

minorVersion
int minorVersion()

Returns OpenGL minor version.

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. This will attempt to load every OpenGL function except deprecated. Warning: This may be dangerous because drivers may miss some functions!

resizeViewport
void resizeViewport()
runtimeCheck
void runtimeCheck()

Checks pending OpenGL errors.

runtimeCheckNothrow
bool runtimeCheckNothrow()

Checks pending OpenGL errors. Returns true if at least one OpenGL error was pending. OpenGL error status is cleared.

supportsExtension
bool supportsExtension(string extension)

Returns true if the OpenGL extension is supported.

swapBuffers
void swapBuffers()

Swap OpenGL buffers.

vendor
Vendor vendor()

Tries to detect the driver maker. Returns identified vendor.

vendorString
const(char)[] vendorString()

Returns the company responsible for this OpenGL implementation.

versionString
const(char)[] versionString()

Returns OpenGL version string.

Static functions

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

Inherited Members

From VideoBackend

_extensions
string[] _extensions;
Undocumented in source.
_majorVersion
int _majorVersion;
Undocumented in source.
_minorVersion
int _minorVersion;
Undocumented in source.
_maxColorAttachments
int _maxColorAttachments;
Undocumented in source.
supportsExtension
bool supportsExtension(string extension)
reload
void reload()
debugCheck
void debugCheck()
runtimeCheck
void runtimeCheck()
runtimeCheckNothrow
bool runtimeCheckNothrow()
majorVersion
int majorVersion()
minorVersion
int minorVersion()
versionString
const(char)[] versionString()
vendorString
const(char)[] vendorString()
vendor
Vendor vendor()
graphicsEngineString
const(char)[] graphicsEngineString()
glslVersionString
const(char)[] glslVersionString()
extensions
string[] extensions()
maxColorAttachments
int maxColorAttachments()
activeTexture
void activeTexture(int texture_id)
resizeViewport
void resizeViewport()
clear
void clear()
clearColor
void clearColor(float r, float g, float b, float a)
swapBuffers
void swapBuffers()

Meta