|
Brenta Engine 1.0
|
OpenGL helper functions. More...
#include <gl_helper.hpp>
Static Public Member Functions | |
| static void | LoadOpenGL (bool gl_blending=true, bool gl_cull_face=true, bool gl_multisample=true, bool gl_depth_test=true) |
| Load OpenGL. | |
| static void | SetPoligonMode (GLboolean enable) |
| Set Poligon Mode. | |
| static void | SetViewport (int x, int y, int SCR_WIDTH, int SCR_HEIGHT) |
| Set Viewport. | |
| static void | SetColor (float r, float g, float b, float a) |
| Set Clear Color. | |
| static void | DrawArrays (GLenum mode, int first, int count) |
| Draw Arrays. | |
| static void | DrawElements (GLenum mode, int count, GLenum type, const void *indices) |
| Draw Elements. | |
| static void | Clear () |
| Clear. | |
| static void | BindVertexArray (unsigned int n) |
| Enable Depth Test. | |
| static GLenum | glCheckError_ (const char *file, int line) |
| Check OpenGL error. | |
OpenGL helper functions.
This class contains helper functions to interact with OpenGL.
Definition at line 45 of file gl_helper.hpp.
|
static |
Enable Depth Test.
This function enables the depth test.
Definition at line 125 of file gl_helper.cpp.
|
static |
Clear.
This function clears the color and depth buffer.
Definition at line 119 of file gl_helper.cpp.
|
static |
Draw Arrays.
This function draws primitives from the array data.
| mode | Specifies what kind of primitives to render |
| first | Specifies the starting index in the enabled arrays |
| count | Specifies the number of indices to be rendered |
Definition at line 109 of file gl_helper.cpp.
|
static |
Draw Elements.
This function draws primitives from the array data.
| mode | Specifies what kind of primitives to render |
| count | Specifies the number of elements to be rendered |
| type | Specifies the type of the values in indices |
| indices | Specifies a pointer to the location where the indices are stored |
Definition at line 114 of file gl_helper.cpp.
|
static |
Check OpenGL error.
This function checks if there is an OpenGL error.
Definition at line 130 of file gl_helper.cpp.
|
static |
Load OpenGL.
This function loads OpenGL and sets some default values.
| gl_blending | Enable blending |
| gl_cull_face | Enable face culling |
| gl_multisample | Enable multisampling |
| gl_depth_test | Enable depth testing |
Definition at line 38 of file gl_helper.cpp.
|
static |
Set Clear Color.
This function sets the clear color of the window.
| r | Red component of the clear color |
| g | Green component of the clear color |
| b | Blue component of the clear color |
| a | Alpha component of the clear color |
Definition at line 104 of file gl_helper.cpp.
|
static |
Set Poligon Mode.
| enable | Enable or disable poligon mode |
Definition at line 84 of file gl_helper.cpp.
|
static |
Set Viewport.
This function sets the viewport of the window.
| x | X coordinate of the viewport |
| y | Y coordinate of the viewport |
| SCR_WIDTH | Width of the viewport |
| SCR_HEIGHT | Height of the viewport |
Definition at line 98 of file gl_helper.cpp.