Activated QT image support, removed freetype, jpeg, png, gif libs dependencies in the Qt project.

This commit is contained in:
Xawotihs
2010-12-06 20:06:03 +00:00
parent 8ba23dd99f
commit 13f467a9ef
2 changed files with 9 additions and 14 deletions
+5 -6
View File
@@ -8,9 +8,8 @@
// //
//------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------
#define GL_GLEXT_PROTOTYPES #define GL_GLEXT_PROTOTYPES
//#define USE_QT_IMAGE
#if (!defined IOS) && (!defined USE_QT_IMAGE) #if (!defined IOS) && (!defined QT_CONFIG)
#ifdef WIN32 #ifdef WIN32
#pragma warning(disable : 4786) #pragma warning(disable : 4786)
#pragma comment( lib, "giflib.lib" ) #pragma comment( lib, "giflib.lib" )
@@ -354,7 +353,7 @@ JTexture::~JTexture()
if (mBuffer) if (mBuffer)
{ {
#ifndef USE_QT_IMAGE #ifndef QT_CONFIG
delete [] mBuffer; delete [] mBuffer;
#endif #endif
mBuffer = NULL; mBuffer = NULL;
@@ -1480,7 +1479,7 @@ static int getNextPower2(int width)
} }
#if (!defined IOS) && (!defined USE_QT_IMAGE) #if (!defined IOS) && (!defined QT_CONFIG)
static void jpg_null(j_decompress_ptr cinfo __attribute__((unused))) static void jpg_null(j_decompress_ptr cinfo __attribute__((unused)))
{ {
} }
@@ -2097,7 +2096,7 @@ JTexture* JRenderer::LoadTexture(const char* filename, int mode, int TextureForm
checkGlError(); checkGlError();
return tex; return tex;
} }
#elif (defined USE_QT_IMAGE) #elif (defined QT_CONFIG)
JTexture* JRenderer::LoadTexture(const char* filename, int mode, int TextureFormat __attribute__((unused))) JTexture* JRenderer::LoadTexture(const char* filename, int mode, int TextureFormat __attribute__((unused)))
{ {
JTexture *tex = NULL; JTexture *tex = NULL;
@@ -2198,7 +2197,7 @@ void JRenderer::TransferTextureToGLContext(JTexture& inTexture)
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, inTexture.mTexWidth, inTexture.mTexHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, inTexture.mBuffer); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, inTexture.mTexWidth, inTexture.mTexHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, inTexture.mBuffer);
} }
} }
#ifndef USE_QT_IMAGE #ifndef QT_CONFIG
delete [] inTexture.mBuffer; delete [] inTexture.mBuffer;
#endif #endif
inTexture.mBuffer = NULL; inTexture.mBuffer = NULL;
+4 -8
View File
@@ -5,7 +5,7 @@
#------------------------------------------------- #-------------------------------------------------
QT += core gui opengl QT += core gui opengl
VERSION = 0.13.0 VERSION = 0.14.0
TARGET = wagic TARGET = wagic
TEMPLATE = app TEMPLATE = app
QMAKE_CXXFLAGS += -Wno-unused-parameter QMAKE_CXXFLAGS += -Wno-unused-parameter
@@ -20,15 +20,15 @@ QT += phonon dbus
} }
windows:INCLUDEPATH += ../../JGE/Dependencies/include windows:INCLUDEPATH += ../../JGE/Dependencies/include
unix:INCLUDEPATH += /usr/include/GL unix:INCLUDEPATH += /usr/include/GL
unix:INCLUDEPATH += /usr/include/freetype2 #unix:INCLUDEPATH += /usr/include/freetype2
INCLUDEPATH += ../../JGE/include INCLUDEPATH += ../../JGE/include
INCLUDEPATH += ../../Boost #INCLUDEPATH += ../../Boost
INCLUDEPATH += include INCLUDEPATH += include
OBJECTS_DIR = objs OBJECTS_DIR = objs
MOC_DIR = objs MOC_DIR = objs
DESTDIR = bin DESTDIR = bin
unix:LIBS += -ljpeg -lgif -lpng12 -lboost_thread -L../../Boost/lib #unix:LIBS += -lboost_thread -L../../Boost/lib
windows:LIBS += -L../../JGE/Dependencies/lib -llibjpeg-static-mt-debug -lgiflib -llibpng -lfmodvc windows:LIBS += -L../../JGE/Dependencies/lib -llibjpeg-static-mt-debug -lgiflib -llibpng -lfmodvc
# MGT # MGT
@@ -247,7 +247,6 @@ SOURCES += \
../../JGE/src/JDistortionMesh.cpp\ ../../JGE/src/JDistortionMesh.cpp\
../../JGE/src/JFileSystem.cpp\ ../../JGE/src/JFileSystem.cpp\
../../JGE/src/JGameObject.cpp\ ../../JGE/src/JGameObject.cpp\
../../JGE/src/JGBKFont.cpp\
../../JGE/src/JGE.cpp\ ../../JGE/src/JGE.cpp\
../../JGE/src/JGui.cpp\ ../../JGE/src/JGui.cpp\
../../JGE/src/JLogger.cpp\ ../../JGE/src/JLogger.cpp\
@@ -261,7 +260,6 @@ SOURCES += \
../../JGE/src/JResourceManager.cpp\ ../../JGE/src/JResourceManager.cpp\
../../JGE/src/JSpline.cpp\ ../../JGE/src/JSpline.cpp\
../../JGE/src/JSprite.cpp\ ../../JGE/src/JSprite.cpp\
../../JGE/src/JTTFont.cpp\
../../JGE/src/Vector2D.cpp\ ../../JGE/src/Vector2D.cpp\
../../JGE/src/tinyxml/tinystr.cpp\ ../../JGE/src/tinyxml/tinystr.cpp\
../../JGE/src/tinyxml/tinyxml.cpp\ ../../JGE/src/tinyxml/tinyxml.cpp\
@@ -291,7 +289,6 @@ HEADERS += \
../../JGE/include/JFileSystem.h\ ../../JGE/include/JFileSystem.h\
../../JGE/include/JGameLauncher.h\ ../../JGE/include/JGameLauncher.h\
../../JGE/include/JGameObject.h\ ../../JGE/include/JGameObject.h\
../../JGE/include/JGBKFont.h\
../../JGE/include/JGE.h\ ../../JGE/include/JGE.h\
../../JGE/include/JGui.h\ ../../JGE/include/JGui.h\
../../JGE/include/JLBFont.h\ ../../JGE/include/JLBFont.h\
@@ -310,7 +307,6 @@ HEADERS += \
../../JGE/include/JSoundSystem.h\ ../../JGE/include/JSoundSystem.h\
../../JGE/include/JSpline.h\ ../../JGE/include/JSpline.h\
../../JGE/include/JSprite.h\ ../../JGE/include/JSprite.h\
../../JGE/include/JTTFont.h\
../../JGE/include/JTypes.h\ ../../JGE/include/JTypes.h\
../../JGE/include/Vector2D.h\ ../../JGE/include/Vector2D.h\
../../JGE/include/Vector3D.h\ ../../JGE/include/Vector3D.h\