[egl] split out texture code into it's own object

This commit is contained in:
Geoffrey McRae
2018-09-23 15:48:44 +10:00
parent fff3ec30b8
commit 00658f3d64
7 changed files with 217 additions and 102 deletions

View File

@@ -21,6 +21,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include <stdbool.h>
#include "egl_shader.h"
#include "egl_texture.h"
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
@@ -30,12 +31,9 @@ typedef struct EGL_Model EGL_Model;
bool egl_model_init(EGL_Model ** model);
void egl_model_free(EGL_Model ** model);
bool egl_model_init_streaming(EGL_Model * model, size_t width, size_t height, size_t bufferSize);
bool egl_model_is_streaming (EGL_Model * model);
bool egl_model_stream_buffer (EGL_Model * model, const uint8_t * buffer, size_t bufferSize);
void egl_model_set_verticies (EGL_Model * model, const GLfloat * verticies, const size_t count);
void egl_model_set_uvs (EGL_Model * model, const GLfloat * uvs , const size_t count);
void egl_model_set_shader (EGL_Model * model, EGL_Shader * shader);
GLuint egl_model_get_texture_id(EGL_Model * model);
void egl_model_set_shader (EGL_Model * model, EGL_Shader * shader);
void egl_model_set_texture (EGL_Model * model, EGL_Texture * texture);
void egl_model_render(EGL_Model * model);