LibGame
v0.4.0
The LG Game Engine - Copyright (C) 2024 ETMSoftware
|
Functions | |
LG_VBO | LG_VBO_new (const void *vertex_data, unsigned int size) |
int | LG_VBO_set_data (LG_VBO *vbo, const void *vertex_data) |
void | LG_VBO_free (LG_VBO *vbo) |
void | LG_VBO_bind (LG_VBO *vbo) |
void | LG_VBO_unbind () |
LG_IBO | LG_IBO_new (const void *vertex_indices, unsigned int size) |
int | LG_IBO_set_data (LG_IBO *ibo, const void *vertex_indices) |
void | LG_IBO_free (LG_IBO *ibo) |
void | LG_IBO_bind (LG_IBO *ibo) |
void | LG_IBO_unbind () |
LG_VAO | LG_VAO_new () |
void | LG_VAO_free (LG_VAO *vao) |
void | LG_VAO_bind (LG_VAO *vao, zboolean gl_checking) |
void | LG_VAO_unbind () |
=== Wrapper functions to more easily create and manage VBOs, IBOs, and VAOs ===
LG_VBO LG_VBO_new | ( | const void * | vertex_data, |
unsigned int | size | ||
) |
Create a new VBO
Also set buffer data if vertex_data != NULL
VBO id set to LG_INVALID_BUF_OBJ_ID on error
vertex_data | A pointer to data, may be NULL |
size | Size of data |
int LG_VBO_set_data | ( | LG_VBO * | vbo, |
const void * | vertex_data | ||
) |
Set buffer data of an already created VBO
No size param
vbo | A pointer to a LG_VBO |
vertex_data | A pointer to data |
void LG_VBO_unbind | ( | ) |
Unbind a VBO
LG_IBO LG_IBO_new | ( | const void * | vertex_indices, |
unsigned int | size | ||
) |
Create a new IBO
Also set buffer data if vertex_indices != NULL
IBO id set to LG_INVALID_BUF_OBJ_ID on error
vertex_indices | A pointer to indices, may be NULL |
size | Size of indices |
int LG_IBO_set_data | ( | LG_IBO * | ibo, |
const void * | vertex_indices | ||
) |
Set buffer data of an already created IBO
No size param
ibo | A pointer to a LG_IBO |
vertex_indices | A pointer to indices |
void LG_IBO_unbind | ( | ) |
Unbind an IBO
LG_VAO LG_VAO_new | ( | ) |
Create a new VAO
VAO id set to LG_INVALID_BUF_OBJ_ID on error
When first binded, will store/'push' configs done by:
ie vertex attributes
void LG_VAO_bind | ( | LG_VAO * | vao, |
zboolean | gl_checking | ||
) |
Bind a VAO
When binded again, will restore/'pop' configs done by:
ie vertex attributes
vao | A pointer to a LG_VAO |
gl_checking | Enable (TRUE) / disable (FALSE) GL checking |
void LG_VAO_unbind | ( | ) |
UnbBind a VAO