Brenta Engine 1.1
|
OpenGL helper functions. More...
#include <gl_helper.hpp>
Static Public Member Functions | |
static void | load_opengl (bool gl_blending=true, bool gl_cull_face=true, bool gl_multisample=true, bool gl_depth_test=true) |
Load OpenGL. | |
static void | set_poligon_mode (GLboolean enable) |
Set Poligon Mode. | |
static void | set_viewport (int x, int y, int SCR_WIDTH, int SCR_HEIGHT) |
Set Viewport. | |
static void | set_color (float r, float g, float b, float a) |
Set Clear Color. | |
static void | draw_arrays (GLenum mode, int first, int count) |
Draw Arrays. | |
static void | draw_elements (GLenum mode, int count, GLenum type, const void *indices) |
Draw Elements. | |
static void | clear () |
Clear. | |
static void | bind_vertex_array (unsigned int n) |
Enable Depth Test. | |
static GLenum | check_error_ (const char *file, int line) |
Check OpenGL error. | |
OpenGL helper functions.
This class contains helper functions to interact with OpenGL.
Definition at line 43 of file gl_helper.hpp.
|
static |
Enable Depth Test.
This function enables the depth test.
Definition at line 123 of file gl_helper.cpp.
|
static |
Check OpenGL error.
This function checks if there is an OpenGL error.
Definition at line 128 of file gl_helper.cpp.
|
static |
Clear.
This function clears the color and depth buffer.
Definition at line 117 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 107 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 112 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 37 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 102 of file gl_helper.cpp.
|
static |
Set Poligon Mode.
enable | Enable or disable poligon mode |
Definition at line 83 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 97 of file gl_helper.cpp.