Группа :: Система/Библиотеки
Пакет: libglpng
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: libglpng-1.45-alt-nopaletteEXT.patch
Скачать
Скачать
diff -ur libglpng-1.45.old/src/glpng.c libglpng-1.45.orig/src/glpng.c
--- libglpng-1.45.old/src/glpng.c 2015-11-25 11:04:11.348145744 +0000
+++ libglpng-1.45.orig/src/glpng.c 2015-11-25 11:07:49.996825162 +0000
@@ -29,7 +29,7 @@
#include <GL/gl.h>
#include <stdlib.h>
#include <math.h>
-#include "png/png.h"
+#include <png.h>
/* Used to decide if GL/gl.h supports the paletted extension */
#ifdef GL_COLOR_INDEX1_EXT
@@ -113,6 +113,7 @@
}
}
+#ifdef _WIN32
static int ExtSupported(const char *x) {
static const GLubyte *ext = NULL;
const char *c;
@@ -129,6 +130,7 @@
return 0;
}
+#endif
#define GET(o) ((int)*(data + (o)))
@@ -478,6 +480,7 @@
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
#ifdef SUPPORTS_PALETTE_EXT
+ #ifdef _WIN32
if (PalettedTextures && mipmap >= 0 && trans == PNG_SOLID && color == PNG_COLOR_TYPE_PALETTE) {
png_colorp pal;
int cols;
@@ -502,6 +505,7 @@
}
else
#endif
+ #endif
if (trans == PNG_SOLID || trans == PNG_ALPHA || color == PNG_COLOR_TYPE_RGB_ALPHA || color == PNG_COLOR_TYPE_GRAY_ALPHA) {
GLenum glformat;
GLint glcomponent;