mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 14:11:15 +02:00
- removed duplicate code that did nothing
This commit is contained in:
@@ -737,19 +737,6 @@ void Texture1DGl::init(Filter filter, int maxAnisotropy) {
|
||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
|
||||
glTexImage1D(
|
||||
GL_TEXTURE_1D, 0, glCompressionFormat, pixmap.getW(),
|
||||
0, glFormat, GL_UNSIGNED_BYTE, pixels);
|
||||
|
||||
GLint error= glGetError();
|
||||
|
||||
// Now try without compression if we tried compression
|
||||
if(error != GL_NO_ERROR && glCompressionFormat != glInternalFormat) {
|
||||
glTexImage1D(
|
||||
GL_TEXTURE_1D, 0, glInternalFormat, pixmap.getW(),
|
||||
0, glFormat, GL_UNSIGNED_BYTE, pixels);
|
||||
|
||||
GLint error2= glGetError();
|
||||
glTexImage1D(
|
||||
GL_TEXTURE_1D, 0, glCompressionFormat, pixmap.getW(),
|
||||
0, glFormat, GL_UNSIGNED_BYTE, pixels);
|
||||
@@ -893,18 +880,6 @@ void Texture2DGl::init(Filter filter, int maxAnisotropy) {
|
||||
else {
|
||||
//build single texture
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, glCompressionFormat,pixmap.getW(),
|
||||
pixmap.getH(),0, glFormat, GL_UNSIGNED_BYTE, pixels);
|
||||
|
||||
GLint error= glGetError();
|
||||
|
||||
// Now try without compression if we tried compression
|
||||
if(error != GL_NO_ERROR && glCompressionFormat != glInternalFormat) {
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, glInternalFormat,pixmap.getW(),
|
||||
pixmap.getH(),0, glFormat, GL_UNSIGNED_BYTE, pixels);
|
||||
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, glCompressionFormat,pixmap.getW(),
|
||||
@@ -1150,16 +1125,6 @@ void TextureCubeGl::init(Filter filter, int maxAnisotropy) {
|
||||
else {
|
||||
glTexImage2D(
|
||||
target, 0, glCompressionFormat,
|
||||
currentPixmap->getW(), currentPixmap->getH(),
|
||||
0, glFormat, GL_UNSIGNED_BYTE, pixels);
|
||||
|
||||
int error = glGetError();
|
||||
|
||||
// Now try without compression if we tried compression
|
||||
if(error != GL_NO_ERROR && glCompressionFormat != glInternalFormat) {
|
||||
glTexImage2D(
|
||||
target, 0, glInternalFormat,
|
||||
currentPixmap->getW(), currentPixmap->getH(),
|
||||
currentPixmap->getW(), currentPixmap->getH(),
|
||||
0, glFormat, GL_UNSIGNED_BYTE, pixels);
|
||||
|
||||
|
Reference in New Issue
Block a user