14#ifndef TEXTURE_CLASS_H
15#define TEXTURE_CLASS_H
19#include <GLFW/glfw3.h>
59 Texture(
const char *textureFileName);
139 int width,
int height);
152 const char *spriteSheetPath,
int rows,
int columns);
Contient une texture qui peut être utilisé dans un sprite.
Definition textureClass.h:48
int width
Definition textureClass.h:112
void Unbind() const
Détache la texture d'opengl.
Definition textureClass.cpp:80
int getHeight() const
Renvoie la hauteur de la Texture.
Definition textureClass.cpp:76
int getWidth() const
Renvoie la larguer de la Texture.
Definition textureClass.cpp:74
void Delete()
Supprime la texture d'opengl.
Definition textureClass.cpp:82
void Bind() const
Permet de bin la texture a opengl avant de Draw.
Definition textureClass.cpp:78
GLuint ID
Definition textureClass.h:111
int nrChannels
Definition textureClass.h:112
int height
Definition textureClass.h:112
Stock une image.
Definition textureClass.h:31
unsigned char * data
Definition textureClass.h:35
int height
Definition textureClass.h:33
int nrChannels
Definition textureClass.h:34
int width
Definition textureClass.h:32
void bbopFreeImage(Image &image)
Definition textureClass.cpp:164
Image bbopLoadPartialImage(const char *filename, int nrChannels, int x, int y, int width, int height)
Charge de manière partiel une image.
Definition textureClass.cpp:131
std::vector< Texture > bbopLoadSpriteSheet(const char *spriteSheetPath, int rows, int columns)
Charge une sprite sheet dans un vector de Texture.
Definition textureClass.cpp:140
Image bbopCCutImage(const Image &toCC, int x, int y, int width, int height)
Copy et coupe une image.
Definition textureClass.cpp:100
Image bbopLoadImage(const char *filename, int nrChannels)
Load une image.
Definition textureClass.cpp:84