mirror of
https://github.com/glest/glest-source.git
synced 2025-08-20 23:21:19 +02:00
- code cleanup based on additional gcc warnings
This commit is contained in:
@@ -976,22 +976,22 @@ void Pixmap2D::Scale(int format, int newW, int newH) {
|
||||
uint8 *newpixels= new uint8[newW * newH * useComponents];
|
||||
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||
int error = gluScaleImage( format,
|
||||
GLenum glErr = gluScaleImage( format,
|
||||
w, h, GL_UNSIGNED_BYTE, pixels,
|
||||
newW, newH, GL_UNSIGNED_BYTE, newpixels);
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
if(error == GL_NO_ERROR) {
|
||||
if(glErr == GL_NO_ERROR) {
|
||||
init(newW,newH,this->components);
|
||||
pixels = newpixels;
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Scaled image from [%d x %d] to [%d x %d]\n",originalW,originalH,w,h);
|
||||
}
|
||||
else {
|
||||
const char *errorString= reinterpret_cast<const char*>(gluErrorString(error));
|
||||
printf("ERROR Scaling image from [%d x %d] to [%d x %d] error: %d [%s]\n",originalW,originalH,w,h,error,errorString);
|
||||
const char *errorString= reinterpret_cast<const char*>(gluErrorString(glErr));
|
||||
printf("ERROR Scaling image from [%d x %d] to [%d x %d] error: %u [%s]\n",originalW,originalH,w,h,glErr,errorString);
|
||||
|
||||
assertGlWithErrorNumber(error);
|
||||
assertGlWithErrorNumber(glErr);
|
||||
}
|
||||
|
||||
CalculatePixelsCRC(pixels,getPixelByteCount(), crc);
|
||||
|
Reference in New Issue
Block a user