- ported bugfixes for 3.6.0.3 release:

- CMake build system fixes applied during debian testing (like checking for compiler SSE support etc)
 - Windows client fix for headless server operation
 - Crash for some systems when trying to use VBO's
 - Fixed AZERTY keyboard support
 - Enhanced support for screenshots in g3d viewer
 - Updated particle code from titi
 - Bugfix for custom data path override causing compiler error
 - Bugfix for fontconfig to properly find fonts on systems that support and have fontconfig installed (fixes numerous non debian based systems that reported null font errors)
 - Minor UI fix on battle end screen when playing 8 players (last player was sometimes chopped off)
This commit is contained in:
Mark Vejvoda
2012-01-23 07:22:43 +00:00
parent 2224d75d10
commit f40c37f5e8
63 changed files with 948 additions and 470 deletions

View File

@@ -916,20 +916,30 @@ Pixmap2D::~Pixmap2D() {
void Pixmap2D::Scale(int format, int newW, int newH) {
int useComponents = this->getComponents();
int originalW = w;
int originalH = h;
uint8 *newpixels= new uint8[newW * newH * useComponents];
glPixelStorei(GL_PACK_ALIGNMENT, 1);
int error = gluScaleImage( format,
w, h, GL_UNSIGNED_BYTE, pixels,
newW, newH, GL_UNSIGNED_BYTE, newpixels);
if(error != GL_NO_ERROR) {
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
if(error == 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 {
assertGl();
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);
GLenum glErr = error;
assertGlWithErrorNumber(glErr);
}
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
CalculatePixelsCRC(pixels,getPixelByteCount(), crc);
}