SimpleGL  1.1.0
A framework for platform independent rendering
Static Public Member Functions | List of all members
sgl::GL Class Reference

This static class wraps general OpenGL functions. More...

#include <gl_general.hpp>

Static Public Member Functions

static void checkError ()
 Checks if an OpenGL error occured. More...
 
static void enable (Capability cap)
 Enable server-side GL capabilities. More...
 
static void disable (Capability cap)
 Disable server-side GL capabilities. More...
 
static void clearColor (float r, float g, float b, float a)
 Sets the clear color. More...
 
static void clearColor (glm::vec4 color)
 Sets the clear color. More...
 
static void clear (ClearBit mask)
 Clears the specified buffers. More...
 
static void drawArrays (Primitive mode, int first, int count)
 Renders vertex data with the current bound VBO. More...
 
static void blendFunc (BlendFactor source, BlendFactor destination)
 Specify pixel arithmetic. More...
 
static void cullFace (CullFaceMode mode)
 Specify whether front- or back-facing facets can be culled. More...
 
static void depthFunc (DepthFunction func)
 Specify the value used for depth buffer comparisons. More...
 

Detailed Description

This static class wraps general OpenGL functions.

Definition at line 214 of file gl_general.hpp.

Member Function Documentation

void sgl::GL::blendFunc ( BlendFactor  source,
BlendFactor  destination 
)
static

Specify pixel arithmetic.

Parameters
sourceSpecifies how the red, green, blue, and alpha source blending factors are computed.
destinationSpecifies how the red, green, blue, and alpha destination blending factors are computed.

Definition at line 79 of file gl_general.cpp.

void sgl::GL::checkError ( )
static

Checks if an OpenGL error occured.

Definition at line 25 of file gl_general.cpp.

void sgl::GL::clear ( ClearBit  mask)
static

Clears the specified buffers.

Parameters
maskThe bitfield containing the clear buffer bits.

Definition at line 71 of file gl_general.cpp.

void sgl::GL::clearColor ( float  r,
float  g,
float  b,
float  a 
)
static

Sets the clear color.

Parameters
rThe red component.
gThe green component.
bThe blue component.
aThe alpha component.

Definition at line 61 of file gl_general.cpp.

void sgl::GL::clearColor ( glm::vec4  color)
static

Sets the clear color.

Parameters
colorThe RGBA color.

Definition at line 65 of file gl_general.cpp.

void sgl::GL::cullFace ( CullFaceMode  mode)
static

Specify whether front- or back-facing facets can be culled.

Parameters
modeSpecifies whether front- or back-facing facets are candidates for culling.

Definition at line 83 of file gl_general.cpp.

void sgl::GL::depthFunc ( DepthFunction  func)
static

Specify the value used for depth buffer comparisons.

Parameters
funcSpecifies the depth comparison function.

Definition at line 87 of file gl_general.cpp.

void sgl::GL::disable ( Capability  cap)
static

Disable server-side GL capabilities.

Parameters
capThe capability to disable.

Definition at line 57 of file gl_general.cpp.

void sgl::GL::drawArrays ( Primitive  mode,
int  first,
int  count 
)
static

Renders vertex data with the current bound VBO.

Parameters
modeThe Primitive mode to draw.
firstThe index of the array.
countThe number of vertices to draw.

Definition at line 75 of file gl_general.cpp.

void sgl::GL::enable ( Capability  cap)
static

Enable server-side GL capabilities.

Parameters
capThe capability to enable.

Definition at line 53 of file gl_general.cpp.


The documentation for this class was generated from the following files: