GfxBackend

Backend class for graphics engine. It implements IGfxBackendFactory service.

Constructors

this
this(GfxBackendInfo info, GfxBackendOptions options)

Instantiate class using GfxBackendInfo and GfxBackendOptions.

Members

Functions

clearScreen
typeof(this) clearScreen()

Clear the depth, stencil and color of the screen. Returns reference to this so it can be used in a stream.

disableBlend
typeof(this) disableBlend()

* Disable the blend. * Returns reference to this so it can be used in a stream.

enableAlphaBlend
typeof(this) enableAlphaBlend()

* Enable the alpha blend. * Returns reference to this so it can be used in a stream.

enableAnisotropicFiltering
typeof(this) enableAnisotropicFiltering(float value)

* Enable and set anisotropic filtering if possible. * Use 0.0f to disable it. * Only values 4.0f, 8.0f and 16.0f are supported for enabling it. * Returns reference to this so it can be used in a stream.

getInfo
GfxBackendInfo getInfo()

Returns backend info.

getOptions
GfxBackendOptions getOptions()

Returns backend options.

setBackColor
typeof(this) setBackColor(ubyte r, ubyte g, ubyte b, ubyte a)

* Set back color r-red, g-green, b-blue, a-alpha scalars. * A channel value must be in range 0-255, so it can handle 256 possible values. * Returns reference to this so it can be used in a stream.

setBackColor
typeof(this) setBackColor(Color4 color)

* Set back color using $(Color4). * A channel value must be in range 0-255, so it can handle 256 possible values. * Returns reference to this so it can be used in a stream.

setCullingEnabled
typeof(this) setCullingEnabled(bool enabled)

Enable or disable culling. Returns reference to this so it can be used in a stream.

setDepthMask
typeof(this) setDepthMask(bool value)

Set false depth mask to disable writing to depth buffer, render stuff that shouldn't influence the depth buffer then set true to enable it again. Returns reference to this so it can be used in a stream.

setDepthTestEnabled
typeof(this) setDepthTestEnabled(bool enabled)

Enable or disable depth test. Returns reference to this so it can be used in a stream.

setStencilMask
typeof(this) setStencilMask(bool value)

Set true stencil mask and each bit is written to the stencil buffer as is. Set false stencil mask and each bit ends up as 0 in the stencil buffer, disabling writes. TODO: Enable custom stencil mask. Returns reference to this so it can be used in a stream.

setStencilTestEnabled
typeof(this) setStencilTestEnabled(bool enabled)

Enable or disable stencil test. Returns reference to this so it can be used in a stream.

setTextureEnabled
typeof(this) setTextureEnabled(bool enabled)

Enable or disable texture. Returns reference to this so it can be used in a stream.

setWireframeEnabled
typeof(this) setWireframeEnabled(bool enabled)

Enable or disable wireframe. Returns reference to this so it can be used in a stream.

supportsExtension
bool supportsExtension(string extension)

* Returns true if the given extension is supported.

swapWireframe
typeof(this) swapWireframe()

Swap between wireframe and non-wireframe mode. Returns reference to this so it can be used in a stream.

Inherited Members

From IGfxBackendFactory

createBackend
GfxBackend createBackend()

Create graphics backend. Only OpenGL version 3.0 and 4.5 are supported. First time it checks for 4.5 availability and if it's not found, then it checks for version 3.0.

Meta