Subsystem to access low-level graphics API and capabilities.
Name | Description |
LoadIdentity | Replace the current matrix with the identity matrix. |
Declaration void LoadIdentity( void )
|
PushMatrix | Push the current matrix stack. |
Declaration Return Value
true if the current matrix have been pushed successfully; false if the stack size is insufficient.
|
PopMatrix | Pop the current matrix stack. |
Declaration
|
LoadMatrix | Replace the current matrix with the specified matrix. |
Declaration void LoadMatrix( const mat4 m ) Parameters
m : 4x4 transformation matrix to use to replace the current matrix pointed by the active MatrixMode.
|
MultiplyMatrix | Multiply the current matrix with the specified matrix. |
Declaration void MultiplyMatrix( const mat4 m ) Parameters
m : 4x4 transformation matrix to multiply the current matrix pointed by the active MatrixMode.
|
Translate | Multiply the current matrix by a translation matrix. |
Declaration void Translate( float x, float y, float z ) Parameters
x : The x value of the translation vector.
y : The y value of the translation vector.
z : The z value of the translation vector.
|
Rotate | Multiply the current matrix by a rotation matrix. |
Declaration void Rotate( float a, float x, float y, float z ) Parameters
a : Specifies the angle of rotation, in degrees.
x : The x value of the rotation vector.
y : The y value of the rotation vector.
z : The z value of the rotation vector.
|
Scale | Multiply the current matrix by a general scaling matrix. |
Declaration void Scale( float x, float y, float z ) Parameters
x : Scale factors along the x axis.
y : Scale factors along the y axis.
z : Scale factors along the z axis.
|
Enable | Enable a specific graphics state capability. |
Declaration bool Enable( const EnableCap cap ) Parameters
Return Value
true if the cap have been toggled; false if it was already toggled or if the cap does not exists.
|
Disable | Enable a specific graphics state capability. |
Declaration bool Disable( const EnableCap cap ) Parameters
Return Value
true if the cap have been disabled successfully; false if it was already disabled or if the cap does not exists.
|
BlendEquation | Specify the equation used for both the RGB blend equation and the Alpha blend equation. |
Declaration bool BlendEquation( BlendFunction mode ) Parameters
Return Value
true if a change occur; else return false .
|
BlendEquationSeparate | Set the RGB blend equation and the alpha blend equation separately. |
Declaration bool BlendEquationSeparate( BlendFunction modeRGB, BlendFunction modeAlpha ) Parameters
Return Value
true if a state change occur; else return false .
|
BlendFunc | Specify pixel arithmetic. |
Declaration bool BlendFunc( BlendingFactor sfactor, BlendingFactor dfactor ) Parameters
Return Value
true if a state change occur; else return false .
|
BlendFuncSeparate | Specify pixel arithmetic for RGB and alpha components separately. |
Declaration bool BlendFuncSeparate( BlendingFactor srcRGB, BlendingFactor dstRGB, BlendingFactor srcAlpha, BlendingFactor dstAlpha ) Parameters
Return Value
true if a state change occur; else return false .
|
CullFace | Specify whether front or back-facing triangles can be culled. |
Declaration bool CullFace( CullFaceMode mode ) Parameters
Return Value
true if a state change occur; else return false .
|
StencilFuncSeparate | Set front and/or back function and reference value for stencil testing. |
Declaration bool StencilFuncSeparate( CullFaceMode face, StencilFunction func, int ref, unsigned int mask ) Parameters
face : The new CullFaceMode to use.
func : Specify the StencilFunction to use.
ref : Specifies the reference value for the stencil test.
mask : Specifies a mask that is ANDed with both the reference value and the stored stencil value when the test is done.
Return Value
true if a state change occur; else return false .
|
StencilMaskSeparate | Control the front and/or back writing of individual bits in the stencil planes. |
Declaration bool StencilMaskSeparate( CullFaceMode face, unsigned int mask ) Parameters
face : Determine the CullFaceMode to use.
mask : Specifies a bit mask to enable and disable writing of individual bits in the stencil planes.
Return Value
true if a state change occur; else return false .
|
StencilOp | Set front and back stencil test actions. |
Declaration bool StencilOp( StencilOp fail, StencilOp zfail, StencilOp zpass ) Parameters
fail : Specifies the StencilOp to take when the stencil test fails.
zfail : Specifies the StencilOp when the stencil test passes, but the depth test fails.
zpass : Specifies the StencilOp when both the stencil test and the depth test pass.
Return Value
true if a state change occur; else return false .
|
StencilOpSeparate | Set the front or back stencil test actions. |
Declaration bool StencilOpSeparate( CullFaceMode face, StencilOp fail, StencilOp zfail, StencilOp zpass ) Parameters
face : Specify the CullFaceMode of the stencil.
fail : Specifies the StencilOp to take when the stencil test fails.
zfail : Specifies the StencilOp when the stencil test passes, but the depth test fails.
zpass : Specifies the StencilOp when both the stencil test and the depth test pass.
Return Value
true if a state change occur; else return false .
|
PushAttribs | Push one or more type of attributes settings. |
Declaration bool PushAttribs( AttribBit mask ) Parameters
mask : Bit mask of AttribBit that specifies which attributes to push.
Return Value
true if the attributes were pushed; false if there is no more stack available.
|
PopAttribs | Pop back one or more type of attributes settings. |
Declaration void PopAttribs( AttribBit mask ) Parameters
|
FrontFace | Define front and back-facing triangles. |
Declaration bool FrontFace( FrontFaceDirection mode ) Parameters
Return Value
true if a state change occur; else return false .
|
ActiveTexture | Select active texture unit. |
Declaration int ActiveTexture( unsigned char texture ) Parameters
texture : Index of the active texture unit to activate.
Return Value
true if the active texture have changed; else return false .
|
BindTexture | Define front and back-facing triangles. |
Declaration bool BindTexture( unsigned char active_texture, const TextureTarget target, unsigned int texture ) Parameters
active_texture : Active texture unit.
target : Specified the TextureTarget.
texture : Specifies the texture_id of the Texture to bind.
Return Value
true if a state change occur; else return false .
|
IsActiveTexture | Helper to check if a specific texture slot is currently active. |
Declaration bool IsActiveTexture( unsigned char texture ) Parameters
texture : Index of the active texture to check.
Return Value
true if the texture unit is active; else return false .
|
MatrixMode | Specify which matrix is the current matrix. |
Declaration void MatrixMode( MatrixMode matrix_mode ) Parameters
Return Value
true if a state change occur; else return false .
|
GetViewMatrix | Return the active view matrix. |
Declaration mat4 GetViewMatrix( void ) Return Value
The current 4x4 view matrix.
|
GetModelMatrix | Return the active model matrix. |
Declaration mat4 GetModelMatrix( void ) Return Value
The current 4x4 model matrix.
|
GetModelViewMatrix | Return the active model matrix multiplied by the view matrix. |
Declaration mat4 GetModelViewMatrix( void ) Return Value
The active modelview matrix.
|
GetProjectionMatrix | Return the current projection matrix. |
Declaration mat4 GetProjectionMatrix( void ) Return Value
The current 4x4 projection matrix.
|
GetModelViewProjectionMatrix | Return the active modelview matrix multiplied by the projection matrix. |
Declaration mat4 GetModelViewProjectionMatrix( void ) Return Value
Return the active modelview matrix multiplied by the current projection matrix.
|
GetNormalMatrix | Return normalize 3x3 part of the active model matrix. |
Declaration mat3 GetNormalMatrix( void ) Return Value
The normalized rotational part of the model matrix.
|
GetViewport | Get get active viewport coordinates. |
Declaration Return Value
A quad containing the active viewport coordinates.
|
GetFrustum | Helper that return the current frustum that is used for clipping. |
Declaration Return Value
The active clipping frustum.
|
GetScissor | Return the current scissor coordinates. |
Declaration Return Value
A quad containing the active scissor coordinates.
|
IsEnabled | Helper check if a specific EnableCap is on or off. |
Declaration bool IsEnabled( const EnableCap cap ) Parameters
Return Value
true is enabled; false if disabled.
|
LineWidth | Change the tickness to use when drawing lines. |
Declaration bool LineWidth( float width ) Parameters
width : The new line tickness to use.
Return Value
true if a state change occur; else return false .
|
GetLineWidth | Retrieve the current line tickness in use. |
Declaration float GetLineWidth( void ) Return Value
The active line thickness that is currently in use.
|
PointSize | Change the size to use when drawing points. |
Declaration bool PointSize( float size ) Parameters
size : The size to use when drawing points.
Return Value
true if a state change occur; else return false .
|
GetPointSize | Retrieve the size that is used when drawing points. |
Declaration float GetPointSize( void ) Return Value
Current size of points.
|
Scissor | Define the active scissor box. |
Declaration bool Scissor( int x, int y, int width, int height ) Parameters
xy : Specify the lower left corner of the scissor box.
width/height : Specify the width and height of the scissor box.
Return Value
true if a state change occur; else return false .
|
Viewport | Define the active viewport box. |
Declaration bool Viewport( int x, int y, int width, int height ) Parameters
xy : Specify the lower left corner of the viewport box.
width/height : Specify the width and height of the viewport box.
Return Value
true if a state change occur; else return false .
|
ClearDepth | Specify the clear value for the depth buffer. |
Declaration bool ClearDepth( float depth ) Parameters
depth : Specifies the depth value used when the depth buffer is cleared.
Return Value
true if a state change occur; else return false .
|
DepthFunc | Specify the value used for depth buffer comparisons. |
Declaration bool DepthFunc( StencilFunction func ) Parameters
Return Value
true if a state change occur; else return false .
|
DepthRange | Specify mapping of depth values from normalized device coordinates to window coordinates. |
Declaration bool DepthRange( float zNear, float zFar ) Parameters
zNear : Specifies the mapping of the near clipping plane to window coordinates.
zFar : Specifies the mapping of the far clipping plane to window coordinates.
Return Value
true if a state change occur; else return false .
|
ClearStencil | Specify the clear value for the stencil buffer. |
Declaration bool ClearStencil( int s ) Parameters
s : Specifies the index used when the stencil buffer is cleared.
Return Value
true if a state change occur; else return false .
|
StencilFunc | Set front and back function and reference value for stencil testing. |
Declaration bool StencilFunc( StencilFunction func, int ref, unsigned int mask ) Parameters
func : Specifies the test StencilFunction.
ref : Specifies the reference value for the stencil test.
mask : Specifies a mask that is ANDed with both the reference value and the stored stencil value when the test is done.
Return Value
true if a state change occur; else return false .
|
StencilMask | Control the front and back writing of individual bits in the stencil planes. |
Declaration bool StencilMask( unsigned int mask ) Parameters
mask : Specifies a bit mask to enable and disable writing of individual bits in the stencil planes.
Return Value
true if a state change occur; else return false .
|
PolygonOffset | Set the scale and units used to calculate depth values. |
Declaration bool PolygonOffset( float factor, float units ) Parameters
factor : Specifies a scale factor that is used to create a variable depth offset for each polygon.
units : Is multiplied by an implementation-specific value to create a constant depth offset.
Return Value
true if a state change occur; else return false .
|
Clear | Clear buffers to preset values. |
Declaration void Clear( const ClearBuffer mask ) Parameters
|
ClearColor | Specify clear values for the color buffer. |
Declaration bool ClearColor( const vec4 color ) Parameters
color : Color to use to clear the color buffer.
Return Value
true if a state change occur; else return false .
- Note
- In the editor view3d to override the default background gradient of the viewport insure that the
alpha value is above 0.0 . Take note that this behavior does not apply at runtime or when going fullscreen.
|
ColorMask | Enable and disable writing of frame buffer color components. |
Declaration bool ColorMask( bool red, bool green, bool blue, bool alpha ) Parameters
red : Specify whether red can or cannot be written into the frame buffer.
green : Specify whether green can or cannot be written into the frame buffer.
blue : Specify whether blue can or cannot be written into the frame buffer.
alpha : Specify whether alpha can or cannot be written into the frame buffer.
Return Value
true if a state change occur; else return false .
|
GetExtension | Manually test wether or not a specific extension is available. |
Declaration bool GetExtension( const char *ext ) Parameters
ext : Name of the extension to test.
Return Value
true if the extension is available; else return false .
|
ReadPixels | Read a pixel from the active backbuffer or FrameBuffer. |
Declaration vec3 ReadPixels( int x, int y ) Parameters
x : The X position of the pixel to read from the active color buffer.
y : The Y position of the pixel to read from the active color buffer.
Return Value
A vector containing the RGB (as unsigned byte) of the color picked from the active color buffer.
|
A structure to store the current driver configuration and limitations.