QtImageCodec
Written for CEGUI 0.7
Works with versions 0.7.x (obsolete)
Contents
Introduction
QtImageCodec - image codec for CEGUI, that loads images using Qt.
Installation
Compile image codec
Download image codec sources. Extract it. In extracted directory open terminal and type:
qmake make
Put compiled "libCEGUIQtImageCodec-0.7.0.so" from "bin" to system directory for shared libraries. This can be "/usr/local/lib" for example. Then run "ldconfig" as administrator.
Compile Qt plugin for TGA support
Qt does not support TGA image loading, but there is a plugin for it in KDE that supports doing that. To compile it download its source from the following locations:
http://websvn.kde.org/*checkout*/trunk/KDE/kdelibs/kimgio/tga.h http://websvn.kde.org/*checkout*/trunk/KDE/kdelibs/kimgio/tga.cpp
Put it into a separate directory, for example "qtga". In that directory open terminal and issue the following command:
qmake -project
Open generated project file ("qtga.pro") and make sure it contains the following statements:
TEMPLATE = lib CONFIG += plugin
Then in the terminal type:
qmake make
Put the built shared library ("libqtga.so") to "imageformats" subdirectory of qt plugin directory. For example this can be something like "/usr/lib64/qt4/plugins/imageformats" on 64 bit linux system.
Configure CEGUI library
In order to make this codec the default image codec used by CEGUI before compiling CEGUI configure it with the following command:
./configure --with-default-image-codec=QtImageCodec
Alternatively image codec used by CEGUI system can be changed in the source code of an application:
CEGUI::System::getSingleton ().setImageCodec ("QtImageCodec");