From 001d37b257b126dd6ef1dced70f94ff3d2806d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Dziwi=C5=84ski?= Date: Sat, 16 Feb 2013 22:37:43 +0100 Subject: CInstanceManager refactoring * removed classes managed by CInstanceManager except for CObject, CPyro, CBrain and CPhysics because of dependencies * refactored instance searching to use existing singleton instances of CApplication, CEngine and CRobotMain and calling their getter functions --- test/envs/opengl/CMakeLists.txt | 13 +++++++++---- test/envs/opengl/light_test.cpp | 6 +++--- test/envs/opengl/model_test.cpp | 3 +++ test/envs/opengl/texture_test.cpp | 2 ++ test/envs/opengl/transform_test.cpp | 5 +++-- 5 files changed, 20 insertions(+), 9 deletions(-) (limited to 'test/envs') diff --git a/test/envs/opengl/CMakeLists.txt b/test/envs/opengl/CMakeLists.txt index 588a864..3de5466 100644 --- a/test/envs/opengl/CMakeLists.txt +++ b/test/envs/opengl/CMakeLists.txt @@ -15,7 +15,6 @@ ${SRC_DIR}/graphics/opengl/gldevice.cpp ${SRC_DIR}/graphics/engine/modelfile.cpp ${SRC_DIR}/common/logger.cpp ${SRC_DIR}/common/image.cpp -${SRC_DIR}/common/iman.cpp ${SRC_DIR}/common/stringutils.cpp ${SRC_DIR}/app/system.cpp model_test.cpp @@ -25,7 +24,6 @@ set(TRANSFORM_SOURCES ${SRC_DIR}/graphics/opengl/gldevice.cpp ${SRC_DIR}/common/logger.cpp ${SRC_DIR}/common/image.cpp -${SRC_DIR}/common/iman.cpp ${SRC_DIR}/app/system.cpp transform_test.cpp ) @@ -34,20 +32,27 @@ set(LIGHT_SOURCES ${SRC_DIR}/graphics/opengl/gldevice.cpp ${SRC_DIR}/common/logger.cpp ${SRC_DIR}/common/image.cpp -${SRC_DIR}/common/iman.cpp ${SRC_DIR}/app/system.cpp light_test.cpp ) include_directories(${SRC_DIR} ${CMAKE_CURRENT_BINARY_DIR}) +include_directories( +SYSTEM +${SDL_INCLUDE_DIR} +${SDLIMAGE_INCLUDE_DIR} +${SDLTTF_INCLUDE_DIR} +${PNG_INCLUDE_DIRS} +${GLEW_INCLUDE_PATH} +) + set(LIBS ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${PNG_LIBRARIES} -${ADD_LIBS} ) add_executable(texture_test ${TEXTURE_SOURCES}) diff --git a/test/envs/opengl/light_test.cpp b/test/envs/opengl/light_test.cpp index b19ba4b..b1e0151 100644 --- a/test/envs/opengl/light_test.cpp +++ b/test/envs/opengl/light_test.cpp @@ -1,8 +1,10 @@ #include "app/system.h" + #include "common/logger.h" #include "common/image.h" -#include "common/iman.h" + #include "graphics/opengl/gldevice.h" + #include "math/geometry.h" #include @@ -365,8 +367,6 @@ int main(int argc, char *argv[]) GetCurrentTimeStamp(PREV_TIME); GetCurrentTimeStamp(CURR_TIME); - CInstanceManager iMan; - // Without any error checking, for simplicity SDL_Init(SDL_INIT_VIDEO); diff --git a/test/envs/opengl/model_test.cpp b/test/envs/opengl/model_test.cpp index a06a178..882b785 100644 --- a/test/envs/opengl/model_test.cpp +++ b/test/envs/opengl/model_test.cpp @@ -1,8 +1,11 @@ #include "app/system.h" + #include "common/logger.h" #include "common/image.h" + #include "graphics/engine/modelfile.h" #include "graphics/opengl/gldevice.h" + #include "math/geometry.h" #include diff --git a/test/envs/opengl/texture_test.cpp b/test/envs/opengl/texture_test.cpp index de9caf3..b1f352c 100644 --- a/test/envs/opengl/texture_test.cpp +++ b/test/envs/opengl/texture_test.cpp @@ -1,6 +1,8 @@ #include "common/logger.h" #include "common/image.h" + #include "graphics/opengl/gldevice.h" + #include "math/geometry.h" #include diff --git a/test/envs/opengl/transform_test.cpp b/test/envs/opengl/transform_test.cpp index cddd1b8..04c73f7 100644 --- a/test/envs/opengl/transform_test.cpp +++ b/test/envs/opengl/transform_test.cpp @@ -1,8 +1,11 @@ #include "app/system.h" + #include "common/logger.h" #include "common/image.h" #include "common/iman.h" + #include "graphics/opengl/gldevice.h" + #include "math/geometry.h" #include @@ -242,8 +245,6 @@ int main(int argc, char *argv[]) GetCurrentTimeStamp(PREV_TIME); GetCurrentTimeStamp(CURR_TIME); - CInstanceManager iMan; - // Without any error checking, for simplicity SDL_Init(SDL_INIT_VIDEO); -- cgit v1.2.3-1-g7c22