OpenGL error output in debug window + highdpi mode test
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
|
||||
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), Filter_Max(GL_LINEAR)
|
||||
: Width(0), Height(0), Internal_Format(GL_RGB), Image_Format(GL_RGB), Wrap_S(GL_REPEAT), Wrap_T(GL_REPEAT), Filter_Min(GL_NEAREST_MIPMAP_NEAREST), Filter_Max(GL_NEAREST)
|
||||
{
|
||||
glGenTextures(1, &this->ID);
|
||||
}
|
||||
@@ -16,7 +16,12 @@ void Texture2D::Generate(GLuint width, GLuint height, unsigned char* data) {
|
||||
glBindTexture(GL_TEXTURE_2D, this->ID);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, this->Internal_Format, width, height, 0, this->Image_Format, GL_UNSIGNED_BYTE, data);
|
||||
glGenerateMipmap(GL_TEXTURE_2D);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
|
||||
|
||||
//Anistropic filtering
|
||||
//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);
|
||||
|
||||
Reference in New Issue
Block a user