- try to see if this fixes an opengl bug, by retrying texture loading using older opengl API if newer fails
This commit is contained in:
parent
c196e1ccfc
commit
5ce6c17f7d
|
@ -852,10 +852,8 @@ void Texture2DGl::init(Filter filter, int maxAnisotropy) {
|
||||||
if(error2 == GL_NO_ERROR) {
|
if(error2 == GL_NO_ERROR) {
|
||||||
error = GL_NO_ERROR;
|
error = GL_NO_ERROR;
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, glFilter);
|
if(error != GL_NO_ERROR) {
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
|
||||||
|
|
||||||
int error3= gluBuild2DMipmaps(
|
int error3= gluBuild2DMipmaps(
|
||||||
GL_TEXTURE_2D, glCompressionFormat,
|
GL_TEXTURE_2D, glCompressionFormat,
|
||||||
pixmap.getW(), pixmap.getH(),
|
pixmap.getW(), pixmap.getH(),
|
||||||
|
@ -864,7 +862,7 @@ void Texture2DGl::init(Filter filter, int maxAnisotropy) {
|
||||||
error = GL_NO_ERROR;
|
error = GL_NO_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//
|
//
|
||||||
|
|
||||||
if(error != GL_NO_ERROR) {
|
if(error != GL_NO_ERROR) {
|
||||||
|
@ -1109,7 +1107,8 @@ void TextureCubeGl::init(Filter filter, int maxAnisotropy) {
|
||||||
if(error2 == GL_NO_ERROR) {
|
if(error2 == GL_NO_ERROR) {
|
||||||
error = GL_NO_ERROR;
|
error = GL_NO_ERROR;
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
|
if(error != GL_NO_ERROR) {
|
||||||
int error3= gluBuild2DMipmaps(
|
int error3= gluBuild2DMipmaps(
|
||||||
target, glCompressionFormat,
|
target, glCompressionFormat,
|
||||||
currentPixmap->getW(), currentPixmap->getH(),
|
currentPixmap->getW(), currentPixmap->getH(),
|
||||||
|
@ -1120,7 +1119,7 @@ void TextureCubeGl::init(Filter filter, int maxAnisotropy) {
|
||||||
error = GL_NO_ERROR;
|
error = GL_NO_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//
|
//
|
||||||
|
|
||||||
if(error != GL_NO_ERROR) {
|
if(error != GL_NO_ERROR) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user