first commit
This commit is contained in:
26
src/engine/texture.h
Normal file
26
src/engine/texture.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <GL/glew.h>
|
||||
#include <GL/gl.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_image.h>
|
||||
|
||||
#include "../COMMON.h"
|
||||
|
||||
#define STRING_SDL_IMAGE_LOAD_ERROR "[ERROR] Unable to load image: %s | %s\n"
|
||||
#define STRING_SDL_IMAGE_LOAD_SUCCESS "[INFO] Loaded image: %s\n"
|
||||
|
||||
typedef struct Texture
|
||||
{
|
||||
GLuint handle;
|
||||
ivec2 size;
|
||||
bool isInit;
|
||||
} Texture;
|
||||
|
||||
bool texture_from_path_init(Texture* self, const char* path);
|
||||
void texture_init(Texture* self, ivec2 size, void* data);
|
||||
void texture_surface_init(Texture* self, SDL_Surface* surface);
|
||||
void texture_parameter_set(GLenum pname, GLint parameter);
|
||||
void texture_bind(Texture* self);
|
||||
void texture_unbind(void);
|
||||
void texture_free(Texture* self);
|
Reference in New Issue
Block a user