37 void setTexParameteri(
const unsigned int &pname,
const int &pval);
45 void setTexParameterf(
const unsigned int &pname,
const float &pval);
52 inline void createTexture2D(
void *data) {
54 this->fastCreateTexture2D(data);
62 void fastCreateTexture2D(
void *data);
64 void fastCreateCustomTexture2D(
const unsigned int &target,
const unsigned int &level,
const unsigned int &internalFormat,
const unsigned int &width,
const unsigned int &height,
const unsigned int &border,
const unsigned int &format,
const unsigned int &type,
void *data);
69 void generateMipmap();
76 inline unsigned int getId()
const {
return this->m_id; }
83 inline unsigned int getWidth()
const {
return this->m_size.x; }
90 inline void setWidth(
const unsigned int &width) {
91 this->m_size.x = width;
92 this->rescaleTexture();
100 inline unsigned int getHeight()
const {
return this->m_size.y; }
107 inline void setHeight(
const unsigned int &height) {
108 this->m_size.y = height;
109 this->rescaleTexture();
121 this->rescaleTexture();
127 m_params(params), m_size(size) {
130 Texture(
const TextureParams ¶ms,
const unsigned int &width,
const unsigned int &height) :
131 m_params(params), m_size({width, height}) {
134 ~Texture() =
default;
138 void rescaleTexture();
140 unsigned int m_id = 0;
148 bool m_attached =
false;
149 bool m_created =
false;
Data structure to create an ogl::Texture using these parameters.
Definition Structs.hpp:20