[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/libs/kgllib/examples/simpleflying
From: Rivo Laks <rivolaks () hot ! ee>
Date: 2008-09-17 17:49:52
Message-ID: 1221673792.546701.28015.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 861971 by rivol:
Use Qt's resource system here as well, once again making the executable work outside the
source dir and also going towards fixing compilation with builddir = srcdir
M +2 -1 CMakeLists.txt
A flying.qrc
D height-128.png
D height-256.png
D height-512.png
A height.png height-512.png#854945
D kgllib-test
M +4 -4 testwidget.cpp
--- trunk/playground/libs/kgllib/examples/simpleflying/CMakeLists.txt #861970:861971
@@ -8,6 +8,7 @@
testwidget.cpp
)
qt4_automoc(${kgllib-test_SRCS})
-add_executable(kgllib-test ${kgllib-test_SRCS})
+qt4_add_resources(kgllib-test_RESOURCES flying.qrc)
+add_executable(kgllib-test ${kgllib-test_SRCS} ${kgllib-test_RESOURCES})
target_link_libraries(kgllib-test kgllib-extras)
--- trunk/playground/libs/kgllib/examples/simpleflying/testwidget.cpp #861970:861971
@@ -106,13 +106,13 @@
setClearColor(fogcolor);
qDebug() << "loading qt4 tex";
- tex = new KGLLib::Texture("pilt.png");
+ tex = new KGLLib::Texture(":/pilt.png");
qDebug() << "loading grass tex";
- grass = new KGLLib::Texture("grass1.jpg");
+ grass = new KGLLib::Texture(":/grass1.jpg");
KGLLib::checkGLError("init3");
qDebug() << "loeading terrain";
- terrain = new KGLLib::SimpleTerrain("height.png");
+ terrain = new KGLLib::SimpleTerrain(":/height.png");
terrain->setTileSize(10);
terrain->setHeightRange(-200, 200);
terrain->setTexture(grass);
@@ -123,7 +123,7 @@
}
qDebug() << "loading program";
- program = new KGLLib::Program("test.vert", "test.frag");
+ program = new KGLLib::Program(":/test.vert", ":/test.frag");
KGLLib::checkGLError("init5.1");
if (!program->isValid()) {
return setErrorText("Data couldn't be loaded");
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic