Formatted classes
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
|
||||
#include "Texture.h"
|
||||
|
||||
|
||||
Texture2D::Texture2D()
|
||||
: Width(0), Height(0), Internal_Format(GL_RGB), Image_Format(GL_RGB), Wrap_S(GL_REPEAT), Wrap_T(GL_REPEAT), Filter_Min(GL_LINEAR_MIPMAP_NEAREST), Filter_Max(GL_NEAREST)
|
||||
: Width(0), Height(0), Internal_Format(GL_RGB), Image_Format(GL_RGB), Wrap_S(GL_REPEAT), Wrap_T(GL_REPEAT), Filter_Min(GL_LINEAR_MIPMAP_NEAREST), Filter_Max(GL_LINEAR)
|
||||
{
|
||||
glGenTextures(1, &this->ID);
|
||||
}
|
||||
|
||||
void Texture2D::Generate(GLuint width, GLuint height, unsigned char* data) {
|
||||
void Texture2D::Generate(GLuint width, GLuint height, unsigned char *data)
|
||||
{
|
||||
this->Width = width;
|
||||
this->Height = height;
|
||||
// Create Texture
|
||||
@@ -21,7 +21,7 @@ void Texture2D::Generate(GLuint width, GLuint height, unsigned char* data) {
|
||||
//float aniso = 0.0f;
|
||||
//glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &aniso);
|
||||
//glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, aniso);
|
||||
|
||||
|
||||
// Set Texture wrap and filter modes
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, this->Wrap_S);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, this->Wrap_T);
|
||||
@@ -31,6 +31,7 @@ void Texture2D::Generate(GLuint width, GLuint height, unsigned char* data) {
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
}
|
||||
|
||||
void Texture2D::Bind() const {
|
||||
void Texture2D::Bind() const
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, this->ID);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user