Changeset 4165 in orxonox.OLD for orxonox/branches/heightMap/src
- Timestamp:
- May 11, 2005, 2:23:54 PM (20 years ago)
- Location:
- orxonox/branches/heightMap/src
- Files:
-
- 36 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/heightMap/src/Makefile.am
r4122 r4165 22 22 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/animation 23 23 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/common 24 AM_CXXFLAGS+=-I$(MAINSRCDIR)/subprojects 24 25 25 26 … … 32 33 33 34 orxonox_DEPENDENCIES = libORXgui.a 34 orxonox_LDADD = libORXgui.a 35 orxonox_LDADD = libORXgui.a $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS) 35 36 orxonox_SOURCES= orxonox.cc \ 36 37 game_loader.cc \ … … 89 90 lib/xmlparser/tinystr.cc \ 90 91 lib/xmlparser/tinyxmlerror.cc \ 91 lib/xmlparser/tinyxmlparser.cc 92 lib/xmlparser/tinyxmlparser.cc \ 93 subprojects/benchmark.cc 92 94 93 95 … … 163 165 lib/gui/gui/gui_banner.h \ 164 166 lib/gui/gui/gui_keys.h \ 165 lib/gui/gui/gui_update.h 167 lib/gui/gui/gui_update.h \ 168 subprojects/benchmark.h 166 169 167 170 libORXgui_a_CPPFLAGS=$(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS) 168 AM_LDFLAGS=$(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)169 171 170 172 libORXgui_a_SOURCES = lib/gui/gui/gui.cc \ -
orxonox/branches/heightMap/src/Makefile.in
r4122 r4165 91 91 glmenu_imagescreen.$(OBJEXT) tinyxml.$(OBJEXT) \ 92 92 tinystr.$(OBJEXT) tinyxmlerror.$(OBJEXT) \ 93 tinyxmlparser.$(OBJEXT) 93 tinyxmlparser.$(OBJEXT) benchmark.$(OBJEXT) 94 94 orxonox_OBJECTS = $(am_orxonox_OBJECTS) 95 am__DEPENDENCIES_1 = 95 96 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) 96 97 depcomp = $(SHELL) $(top_srcdir)/depcomp … … 100 101 @AMDEP_TRUE@ ./$(DEPDIR)/animation_player.Po \ 101 102 @AMDEP_TRUE@ ./$(DEPDIR)/array.Po ./$(DEPDIR)/base_entity.Po \ 102 @AMDEP_TRUE@ ./$(DEPDIR)/base_object.Po ./$(DEPDIR)/camera.Po \ 103 @AMDEP_TRUE@ ./$(DEPDIR)/base_object.Po \ 104 @AMDEP_TRUE@ ./$(DEPDIR)/benchmark.Po ./$(DEPDIR)/camera.Po \ 103 105 @AMDEP_TRUE@ ./$(DEPDIR)/campaign.Po \ 104 106 @AMDEP_TRUE@ ./$(DEPDIR)/character_attributes.Po \ … … 221 223 PACKAGE_VERSION = @PACKAGE_VERSION@ 222 224 PATH_SEPARATOR = @PATH_SEPARATOR@ 225 PKG_CONFIG = @PKG_CONFIG@ 223 226 RANLIB = @RANLIB@ 224 227 SET_MAKE = @SET_MAKE@ … … 272 275 target_vendor = @target_vendor@ 273 276 MAINSRCDIR = . 274 AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/graphics/particles -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/gui/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common 277 AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/graphics/particles -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/gui/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common -I$(MAINSRCDIR)/subprojects 275 278 noinst_LIBRARIES = libORXgui.a 276 279 orxonox_DEPENDENCIES = libORXgui.a 277 orxonox_LDADD = libORXgui.a 280 orxonox_LDADD = libORXgui.a $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS) 278 281 orxonox_SOURCES = orxonox.cc \ 279 282 game_loader.cc \ … … 332 335 lib/xmlparser/tinystr.cc \ 333 336 lib/xmlparser/tinyxmlerror.cc \ 334 lib/xmlparser/tinyxmlparser.cc 337 lib/xmlparser/tinyxmlparser.cc \ 338 subprojects/benchmark.cc 335 339 336 340 noinst_HEADERS = orxonox.h \ … … 405 409 lib/gui/gui/gui_banner.h \ 406 410 lib/gui/gui/gui_keys.h \ 407 lib/gui/gui/gui_update.h 411 lib/gui/gui/gui_update.h \ 412 subprojects/benchmark.h 408 413 409 414 libORXgui_a_CPPFLAGS = $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS) 410 AM_LDFLAGS = $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)411 415 libORXgui_a_SOURCES = lib/gui/gui/gui.cc \ 412 416 lib/gui/gui/gui_gtk.cc \ … … 446 450 esac; \ 447 451 done; \ 448 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/Makefile'; \452 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ 449 453 cd $(top_srcdir) && \ 450 $(AUTOMAKE) -- gnusrc/Makefile454 $(AUTOMAKE) --foreign src/Makefile 451 455 .PRECIOUS: Makefile 452 456 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status … … 513 517 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_entity.Po@am__quote@ 514 518 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_object.Po@am__quote@ 519 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/benchmark.Po@am__quote@ 515 520 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camera.Po@am__quote@ 516 521 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/campaign.Po@am__quote@ … … 1533 1538 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1534 1539 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tinyxmlparser.obj `if test -f 'lib/xmlparser/tinyxmlparser.cc'; then $(CYGPATH_W) 'lib/xmlparser/tinyxmlparser.cc'; else $(CYGPATH_W) '$(srcdir)/lib/xmlparser/tinyxmlparser.cc'; fi` 1540 1541 benchmark.o: subprojects/benchmark.cc 1542 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT benchmark.o -MD -MP -MF "$(DEPDIR)/benchmark.Tpo" -c -o benchmark.o `test -f 'subprojects/benchmark.cc' || echo '$(srcdir)/'`subprojects/benchmark.cc; \ 1543 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/benchmark.Tpo" "$(DEPDIR)/benchmark.Po"; else rm -f "$(DEPDIR)/benchmark.Tpo"; exit 1; fi 1544 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='subprojects/benchmark.cc' object='benchmark.o' libtool=no @AMDEPBACKSLASH@ 1545 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/benchmark.Po' tmpdepfile='$(DEPDIR)/benchmark.TPo' @AMDEPBACKSLASH@ 1546 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1547 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o benchmark.o `test -f 'subprojects/benchmark.cc' || echo '$(srcdir)/'`subprojects/benchmark.cc 1548 1549 benchmark.obj: subprojects/benchmark.cc 1550 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT benchmark.obj -MD -MP -MF "$(DEPDIR)/benchmark.Tpo" -c -o benchmark.obj `if test -f 'subprojects/benchmark.cc'; then $(CYGPATH_W) 'subprojects/benchmark.cc'; else $(CYGPATH_W) '$(srcdir)/subprojects/benchmark.cc'; fi`; \ 1551 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/benchmark.Tpo" "$(DEPDIR)/benchmark.Po"; else rm -f "$(DEPDIR)/benchmark.Tpo"; exit 1; fi 1552 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='subprojects/benchmark.cc' object='benchmark.obj' libtool=no @AMDEPBACKSLASH@ 1553 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/benchmark.Po' tmpdepfile='$(DEPDIR)/benchmark.TPo' @AMDEPBACKSLASH@ 1554 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1555 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o benchmark.obj `if test -f 'subprojects/benchmark.cc'; then $(CYGPATH_W) 'subprojects/benchmark.cc'; else $(CYGPATH_W) '$(srcdir)/subprojects/benchmark.cc'; fi` 1535 1556 uninstall-info-am: 1536 1557 … … 1656 1677 1657 1678 distdir: $(DISTFILES) 1658 $(mkdir_p) $(distdir)/ai $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/data $(distdir)/lib/graphics $(distdir)/lib/graphics/importer $(distdir)/lib/graphics/particles $(distdir)/lib/gui/gui $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/network $(distdir)/proto $(distdir)/story_entities $(distdir)/ util $(distdir)/util/animation $(distdir)/util/common $(distdir)/world_entities1679 $(mkdir_p) $(distdir)/ai $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/data $(distdir)/lib/graphics $(distdir)/lib/graphics/importer $(distdir)/lib/graphics/particles $(distdir)/lib/gui/gui $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/network $(distdir)/proto $(distdir)/story_entities $(distdir)/subprojects $(distdir)/util $(distdir)/util/animation $(distdir)/util/common $(distdir)/world_entities 1659 1680 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ 1660 1681 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ -
orxonox/branches/heightMap/src/factory.h
r4122 r4165 57 57 tFactory<T>::tFactory(const char* name) : Factory(name) 58 58 { 59 printf("fileName: %s\n", name);59 PRINTF(5)("fileName: %s\n", name); 60 60 } 61 61 -
orxonox/branches/heightMap/src/glmenu/glmenu_imagescreen.cc
r4122 r4165 97 97 { 98 98 delete this->backMat; 99 delete barMat;99 delete this->barMat; 100 100 } 101 101 -
orxonox/branches/heightMap/src/lib/Makefile.in
r4122 r4165 113 113 PACKAGE_VERSION = @PACKAGE_VERSION@ 114 114 PATH_SEPARATOR = @PATH_SEPARATOR@ 115 PKG_CONFIG = @PKG_CONFIG@ 115 116 RANLIB = @RANLIB@ 116 117 SET_MAKE = @SET_MAKE@ … … 182 183 esac; \ 183 184 done; \ 184 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/Makefile'; \185 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/Makefile'; \ 185 186 cd $(top_srcdir) && \ 186 $(AUTOMAKE) -- gnusrc/lib/Makefile187 $(AUTOMAKE) --foreign src/lib/Makefile 187 188 .PRECIOUS: Makefile 188 189 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/heightMap/src/lib/coord/p_node.cc
r4122 r4165 99 99 this->parent = parent; 100 100 this->objectName = NULL; 101 this->time = 1.0; /* set time to 1 to make divisions by zero impossible */102 101 } 103 102 … … 281 280 } 282 281 283 284 285 /**286 \brief this calculates the current movement speed of the node287 */288 float PNode::getSpeed() const289 {290 return (this->absCoordinate - this->lastAbsCoordinate).len() / this->time;291 }292 293 /**294 \returns the Velocity of the PNode295 */296 Vector PNode::getVelocity() const297 {298 return (this->absCoordinate - this->lastAbsCoordinate) / this->time;299 }300 301 282 /** 302 283 \brief adds a child and makes this node to a parent … … 424 405 { 425 406 this->lastAbsCoordinate = this->absCoordinate; 426 this->time = dt; 407 427 408 PRINTF(4)("PNode::update - %s - (%f, %f, %f)\n", this->objectName, this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z); 428 409 … … 499 480 delete iterator; 500 481 482 this->velocity = (this->absCoordinate - this->lastAbsCoordinate) / dt; 501 483 this->timeStamp = timeStamp; 502 484 this->bRelCoorChanged = false; -
orxonox/branches/heightMap/src/lib/coord/p_node.h
r4122 r4165 69 69 void shiftDir (const Quaternion& shift); 70 70 71 float getSpeed() const; 72 Vector getVelocity() const; 71 /** \returns the Speed of the Node */ 72 inline float getSpeed() const {return this->velocity.len()/1000;} //! \FIX THIS SHOULD NOT BE /1000 73 /** \returns the Velocity of the Node */ 74 inline const Vector& getVelocity() const {return this->velocity;} 73 75 74 76 void addChild (PNode* pNode, int parentingMode = DEFAULT_MODE); … … 110 112 void init(PNode* parent); 111 113 114 Vector velocity; //!< Saves the velocity. 112 115 Vector lastAbsCoordinate; //!< this is used for speedcalculation, it stores the last coordinate 113 Vector diffCoordinate; //!< this is stored here for performance reasons, difference to the last vector114 float time; //!< time since last update115 116 }; 116 117 -
orxonox/branches/heightMap/src/lib/graphics/Makefile.in
r4122 r4165 113 113 PACKAGE_VERSION = @PACKAGE_VERSION@ 114 114 PATH_SEPARATOR = @PATH_SEPARATOR@ 115 PKG_CONFIG = @PKG_CONFIG@ 115 116 RANLIB = @RANLIB@ 116 117 SET_MAKE = @SET_MAKE@ … … 176 177 esac; \ 177 178 done; \ 178 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/graphics/Makefile'; \179 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/graphics/Makefile'; \ 179 180 cd $(top_srcdir) && \ 180 $(AUTOMAKE) -- gnusrc/lib/graphics/Makefile181 $(AUTOMAKE) --foreign src/lib/graphics/Makefile 181 182 .PRECIOUS: Makefile 182 183 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/heightMap/src/lib/graphics/graphics_engine.cc
r4122 r4165 31 31 { 32 32 this->setClassName ("GraphicsEngine"); 33 34 this->fullscreen = false; 35 33 36 this->initVideo(); 34 37 … … 140 143 int GraphicsEngine::setResolution(int width, int height, int bpp) 141 144 { 145 Uint32 fullscreenFlag; 142 146 this->resolutionX = width; 143 147 this->resolutionY = height; 144 148 this->bitsPerPixel = bpp; 149 if (this->fullscreen) 150 fullscreenFlag = SDL_FULLSCREEN; 151 else 152 fullscreenFlag = 0; 145 153 146 154 printf ("ok\n"); 147 if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags )) == NULL)155 if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags | fullscreenFlag)) == NULL) 148 156 { 149 157 PRINTF(1)("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags, SDL_GetError()); … … 151 159 // return -1; 152 160 } 153 161 } 162 163 void GraphicsEngine::setFullscreen(bool fullscreen) 164 { 165 this->fullscreen = fullscreen; 166 this->setResolution(this->resolutionX, this->resolutionY, this->bitsPerPixel); 154 167 } 155 168 … … 257 270 /* Check if our resolution is restricted */ 258 271 if(this->videoModes == (SDL_Rect **)-1){ 259 PRINTF( 1)("All resolutions available.\n");272 PRINTF(2)("All resolutions available.\n"); 260 273 } 261 274 else{ … … 263 276 PRINT(0)("Available Resoulution Modes are\n"); 264 277 for(int i = 0; this->videoModes[i]; ++i) 265 PRINT( 0)(" | %d x %d\n", this->videoModes[i]->w, this->videoModes[i]->h);278 PRINT(4)(" | %d x %d\n", this->videoModes[i]->w, this->videoModes[i]->h); 266 279 } 267 280 -
orxonox/branches/heightMap/src/lib/graphics/graphics_engine.h
r3844 r4165 26 26 int setGLattribs(void); 27 27 int setResolution(int width, int height, int bpp); 28 void setFullscreen(bool fullscreen = false); 28 29 /** \returns the x resolution */ 29 30 inline int getResolutionX(void) {return this->resolutionX;} -
orxonox/branches/heightMap/src/lib/graphics/importer/Makefile.in
r4122 r4165 150 150 PACKAGE_VERSION = @PACKAGE_VERSION@ 151 151 PATH_SEPARATOR = @PATH_SEPARATOR@ 152 PKG_CONFIG = @PKG_CONFIG@ 152 153 RANLIB = @RANLIB@ 153 154 SET_MAKE = @SET_MAKE@ … … 247 248 esac; \ 248 249 done; \ 249 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/graphics/importer/Makefile'; \250 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/graphics/importer/Makefile'; \ 250 251 cd $(top_srcdir) && \ 251 $(AUTOMAKE) -- gnusrc/lib/graphics/importer/Makefile252 $(AUTOMAKE) --foreign src/lib/graphics/importer/Makefile 252 253 .PRECIOUS: Makefile 253 254 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/heightMap/src/lib/graphics/importer/material.cc
r4111 r4165 45 45 this->setTransparency(1.0); 46 46 47 48 47 this->diffuseTexture = NULL; 49 48 this->ambientTexture = NULL; 50 49 this->specularTexture = NULL; 51 52 this->diffuseTextureSet = false;53 this->ambientTextureSet = false;54 this->specularTextureSet = false;55 50 56 51 this->setName(mtlName); … … 107 102 glShadeModel(GL_SMOOTH); 108 103 109 if (this->diffuseTexture Set)104 if (this->diffuseTexture) 110 105 { 111 106 glEnable(GL_TEXTURE_2D); … … 300 295 { 301 296 PRINTF(4)("setting Diffuse Map %s\n", dMap); 302 // diffuseTexture = new Texture();303 // this->diffuseTextureSet = diffuseTexture->loadImage(dMap);304 297 305 298 //! \todo check if RESOURCE MANAGER is availiable 306 299 //! \todo Textures from .mtl-file need special care. 307 this->diffuseTexture Set = this->diffuseTexture= (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE);300 this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE); 308 301 } 309 302 -
orxonox/branches/heightMap/src/lib/graphics/importer/material.h
r3914 r4165 67 67 Texture* ambientTexture; //!< The ambient texture of the Material. 68 68 Texture* specularTexture;//!< The specular texture of the Material. 69 70 bool diffuseTextureSet; //!< Chekcs if the diffuse texture is Set.71 bool ambientTextureSet; //!< Chekcs if the ambient texture is Set.72 bool specularTextureSet;//!< Chekcs if the specular texture is Set.73 74 69 }; 75 70 #endif -
orxonox/branches/heightMap/src/lib/graphics/particles/particle_system.cc
r4122 r4165 40 40 this->particleType = type; 41 41 this->particles = NULL; 42 this->deadList = NULL; 42 43 this->setConserve(.8); 43 44 this->setLifeSpan(.1); … … 57 58 // delete what has to be deleted here 58 59 ParticleEngine::getInstance()->removeSystem(this); 60 61 // deleting all the living Particles 62 while (this->particles) 63 { 64 Particle* tmpDelPart = this->particles; 65 this->particles = this->particles->next; 66 delete tmpDelPart; 67 } 68 69 // deleting all the dead particles 70 while (this->deadList) 71 { 72 Particle* tmpDelPart = this->deadList; 73 this->deadList = this->deadList->next; 74 delete tmpDelPart; 75 } 59 76 } 60 77 … … 199 216 { 200 217 prevPart->next = tickPart->next; 201 delete tickPart; 218 tickPart->next = this->deadList; 219 this->deadList = tickPart; 202 220 tickPart = prevPart->next; 203 221 } … … 206 224 prevPart = NULL; 207 225 this->particles = tickPart->next; 208 delete tickPart; 226 tickPart->next = this->deadList; 227 this->deadList = tickPart; 209 228 tickPart = this->particles; 210 229 } … … 266 285 if (unlikely(particles == NULL)) 267 286 { 268 this->particles = new Particle; 287 if (likely(deadList != NULL)) 288 { 289 this->particles = this->deadList; 290 deadList = deadList->next; 291 } 292 else 293 this->particles = new Particle; 269 294 this->particles->next = NULL; 270 295 } … … 272 297 else 273 298 { 274 Particle* tmpPart = new Particle; 299 Particle* tmpPart; 300 if (likely(deadList != NULL)) 301 { 302 tmpPart = this->deadList; 303 deadList = deadList->next; 304 } 305 else 306 tmpPart = new Particle; 275 307 tmpPart->next = this->particles; 276 308 this->particles = tmpPart; … … 300 332 PRINT(0)(" ParticleSystem %s\n", this->name); 301 333 PRINT(0)(" ParticleCount: %d, maximumCount: %d :: filled %d%%\n", this->count, this->maxCount, 100*this->count/this->maxCount); 302 } 334 if (deadList) 335 { 336 PRINT(0)(" - ParticleDeadList is used: "); 337 int i = 1; 338 Particle* tmpPart = this->deadList; 339 while (tmpPart = tmpPart->next) ++i; 340 PRINT(0)("count: %d\n", i); 341 } 342 } -
orxonox/branches/heightMap/src/lib/graphics/particles/particle_system.h
r4122 r4165 92 92 Material* material; //!< A Material for all the Particles. 93 93 Particle* particles; //!< A list of particles of this System. 94 Particle* deadList; //!< A list of dead Particles in the System. 94 95 95 96 GLuint* glID; //!< A List of different gl-List-ID's -
orxonox/branches/heightMap/src/lib/gui/Makefile.in
r4122 r4165 113 113 PACKAGE_VERSION = @PACKAGE_VERSION@ 114 114 PATH_SEPARATOR = @PATH_SEPARATOR@ 115 PKG_CONFIG = @PKG_CONFIG@ 115 116 RANLIB = @RANLIB@ 116 117 SET_MAKE = @SET_MAKE@ … … 178 179 esac; \ 179 180 done; \ 180 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/gui/Makefile'; \181 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/gui/Makefile'; \ 181 182 cd $(top_srcdir) && \ 182 $(AUTOMAKE) -- gnusrc/lib/gui/Makefile183 $(AUTOMAKE) --foreign src/lib/gui/Makefile 183 184 .PRECIOUS: Makefile 184 185 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/heightMap/src/lib/gui/console/Makefile.in
r4122 r4165 132 132 PACKAGE_VERSION = @PACKAGE_VERSION@ 133 133 PATH_SEPARATOR = @PATH_SEPARATOR@ 134 PKG_CONFIG = @PKG_CONFIG@ 134 135 RANLIB = @RANLIB@ 135 136 SET_MAKE = @SET_MAKE@ … … 204 205 esac; \ 205 206 done; \ 206 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/gui/console/Makefile'; \207 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/gui/console/Makefile'; \ 207 208 cd $(top_srcdir) && \ 208 $(AUTOMAKE) -- gnusrc/lib/gui/console/Makefile209 $(AUTOMAKE) --foreign src/lib/gui/console/Makefile 209 210 .PRECIOUS: Makefile 210 211 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/heightMap/src/lib/gui/gui/Makefile.in
r4122 r4165 150 150 PACKAGE_VERSION = @PACKAGE_VERSION@ 151 151 PATH_SEPARATOR = @PATH_SEPARATOR@ 152 PKG_CONFIG = @PKG_CONFIG@ 152 153 RANLIB = @RANLIB@ 153 154 SET_MAKE = @SET_MAKE@ … … 264 265 esac; \ 265 266 done; \ 266 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/gui/gui/Makefile'; \267 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/gui/gui/Makefile'; \ 267 268 cd $(top_srcdir) && \ 268 $(AUTOMAKE) -- gnusrc/lib/gui/gui/Makefile269 $(AUTOMAKE) --foreign src/lib/gui/gui/Makefile 269 270 .PRECIOUS: Makefile 270 271 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/heightMap/src/lib/gui/gui/gui.cc
r4122 r4165 53 53 { 54 54 Window* orxonoxGUI = NULL; 55 55 executable = NULL; 56 56 57 initGUI(argc, argv); 57 58 … … 80 81 Box* optionBoxR = new Box('v'); 81 82 { 82 exec = new GuiExec();83 optionBoxR->fill(exec->getWidget());84 85 83 flags = new GuiFlags(); 86 87 84 optionBoxR->fill(flags->getWidget()); 88 85 89 86 update = new GuiUpdate(); 90 87 optionBoxR->fill(update->getWidget()); 88 89 exec = new GuiExec(); 90 optionBoxR->fill(exec->getWidget()); 91 91 } 92 92 windowBox->fill(optionBoxR); … … 94 94 orxonoxGUI->fill(windowBox); 95 95 } 96 97 96 98 // Reading Values from File 97 99 exec->setConfDir(GUI_DEFAULT_CONF_DIR); … … 116 118 } 117 119 #endif /* HAVE_CURL */ 120 } 118 121 122 /** 123 \brief starts the OrxonoxGUI 124 */ 125 void Gui::startGui(void) 126 { 119 127 mainloopGUI(); 128 120 129 #ifndef HAVE_GTK2 121 130 GuiExec::startOrxonox(NULL, exec); … … 123 132 } 124 133 134 void Gui::printHelp() 135 { 136 Window::mainWindow->walkThrough(Widget::printHelp, 1); 137 } 138 139 /** 140 \brief a bool that knows if orxonox should be started 141 */ 125 142 bool Gui::startOrxonox = false; 126 143 -
orxonox/branches/heightMap/src/lib/gui/gui/gui.h
r4122 r4165 26 26 ~Gui(void); 27 27 28 void startGui(void); 29 void printHelp(void); 30 28 31 static bool startOrxonox; 29 32 }; -
orxonox/branches/heightMap/src/lib/gui/gui/gui_audio.cc
r4122 r4165 47 47 enableSound = new CheckButton(CONFIG_NAME_DISABLE_AUDIO); 48 48 enableSound->setFlagName ("no-sound", 0); 49 enableSound->setDescription("Disables Sound", "Check this to disable Sound in Orxonox"); 50 enableSound->setDefaultValue(0); 49 51 enableSound->saveability(); 50 52 audioBox->fill(enableSound); … … 53 55 musicVolume = new Slider("Music Volume", 0, 100); 54 56 musicVolume->setFlagName("music-volume", "m", 80); 57 musicVolume->setDescription("Sets the volume of the ingame music"); 55 58 musicVolume->saveability(); 56 59 audioBox->fill (musicVolume); … … 59 62 effectsVolume = new Slider ("Effects Volume", 0, 100); 60 63 effectsVolume->setFlagName ("effects-volume", "e", 80); 64 effectsVolume->setDescription("Sets the volune of the ingame SoundEffects"); 61 65 effectsVolume->saveability(); 62 66 audioBox->fill (effectsVolume); -
orxonox/branches/heightMap/src/lib/gui/gui/gui_exec.cc
r4122 r4165 70 70 execBox->fill(this->saveSettings); 71 71 72 verboseMode = new Menu(CONFIG_NAME_VERBOSE_MODE, "nothing", "error", "warning", "info", "lastItem"); 72 #ifdef DEBUG 73 verboseMode = new Menu(CONFIG_NAME_VERBOSE_MODE, "nothing", 74 #if DEBUG >=1 75 "error", 76 #endif 77 #if DEBUG >=2 78 "warning", 79 #endif 80 #if DEBUG >=3 81 "info", 82 #endif 83 #if DEBUG >=4 84 "debug", 85 #endif 86 #if DEBUG >=5 87 "heavydebug", 88 #endif 89 "lastItem"); 73 90 verboseMode->setFlagName("verbose", "v", 2); 91 verboseMode->setDescription("Sets the Output Mode", "This Enables Outbug messages\n" 92 "0: nothing will be displayed, but stuff one cannot do without (eg.GUI)\n" 93 #if DEBUG >=1 94 "1: error: outputs all the above and errors" 95 #endif 96 #if DEBUG >=2 97 "2: warning: outputs all the above plus warnings" 98 #endif 99 #if DEBUG >=3 100 "3: info: outputs all the above plus Information" 101 #endif 102 #if DEBUG >=4 103 "4: debug: displays all the above plus debug information" 104 #endif 105 #if DEBUG >=5 106 "5: heavydebug: displays all the above plus heavy debug information: WARNING: the game will run very slow with this." 107 #endif 108 ); 74 109 verboseMode->saveability(); 75 110 execBox->fill(verboseMode); 111 #endif 76 112 77 113 alwaysShow = new CheckButton(CONFIG_NAME_ALWAYS_SHOW_GUI); 78 114 alwaysShow->setFlagName("gui", "g", 0); 115 alwaysShow->setDescription("shows the gui when starting orxonox"); 79 116 alwaysShow->saveability(); 80 117 execBox->fill(alwaysShow); … … 114 151 this->confDir = ResourceManager::homeDirCheck(confDir); 115 152 116 PRINTF( 3)("Config Directory is: %s.\n", this->confDir);153 PRINTF(5)("Config Directory is: %s.\n", this->confDir); 117 154 //! \todo F** Windows-support 118 155 #ifndef __WIN32__ … … 135 172 this->confFile = new char[strlen(this->confDir)+strlen(fileName)+2]; 136 173 sprintf(this->confFile, "%s/%s", this->confDir, fileName); 137 PRINTF( 3)("ConfigurationFile is %s.\n", this->confFile);174 PRINTF(5)("ConfigurationFile is %s.\n", this->confFile); 138 175 } 139 176 -
orxonox/branches/heightMap/src/lib/gui/gui/gui_flags.cc
r4122 r4165 38 38 this->flagsBox->fill(flagsLabel); 39 39 this->shortFlags = new CheckButton("shortFlags"); 40 this->shortFlags->setDefaultValue(0); 40 41 this->flagsBox->fill(shortFlags); 41 42 -
orxonox/branches/heightMap/src/lib/gui/gui/gui_gtk.cc
r4122 r4165 312 312 313 313 /** 314 \brief This is for listing the options of "widget" 315 \param widget specifies the widget that should be listed 316 \param data A Counter, that always knows how many Options have been found yet. 317 */ 318 void Widget::printHelp(Widget* widget) 319 { 320 int helpLen=0; 321 322 if (widget->optionType > GUI_NOTHING) 323 { 324 Option* option = (Option*)widget; 325 if (option->flagName || option->flagNameShort) 326 { 327 PRINT(0)(" "); 328 if (option->flagNameShort) 329 { 330 PRINT(0)("-%s", option->flagNameShort); 331 helpLen += strlen(option->flagNameShort)+1; 332 } 333 if (option->flagName) 334 { 335 if (helpLen > 0) 336 { 337 PRINT(0)("|"); 338 helpLen++; 339 } 340 PRINT(0)("--%s:", option->flagName); 341 helpLen += strlen(option->flagName)+2; 342 } 343 while ((helpLen ++) < 29) 344 PRINT(0)(" "); 345 if (option->shortDescription) 346 PRINT(0)("%s\n", option->shortDescription); 347 else 348 PRINT(0)("\n"); 349 } 350 } 351 } 352 353 /** 314 354 \brief Finds an Option by a given number(the n'th option found away from this Widget) 315 355 \param number The Count of options to wait(by reference) … … 595 635 } 596 636 else 597 PRINTF( 1)("You tried to put more than one Widget into a Container. \nNot including this item.\nThis is only possible with Boxes.\n");637 PRINTF(2)("You tried to put more than one Widget into a Container. \nNot including this item.\nThis is only possible with Boxes.\n"); 598 638 } 599 639 … … 1177 1217 if ((this->value = atoi(tmpChar))=!0) 1178 1218 this->value = 1; 1179 #endif /* HAVE_GTK2 */ 1219 1180 1220 PRINT(0)("%s set to: %d\n", this->title, this->value); 1221 #endif /* HAVE_GTK2 */ 1181 1222 } 1182 1223 … … 1262 1303 if (this->value <= this->start) 1263 1304 this->value = this->start; 1264 #endif /* HAVE_GTK2 */ 1305 1265 1306 PRINT(0)("%s set to: %d\n",this->title, this->value); 1307 #endif /* HAVE_GTK2 */ 1266 1308 } 1267 1309 … … 1370 1412 { 1371 1413 this->value = 0; 1372 PRINTF(2)(" Sorry, but%s has not been found in the Itemlist of %s\n", loadString, this->title);1373 } 1374 PRINTF( 4)( "Loading %s: setting to %d\n", this->title, this->value);1414 PRINTF(2)("%s has not been found in the Itemlist of %s\n", loadString, this->title); 1415 } 1416 PRINTF(5)( "Loading %s: setting to %d\n", this->title, this->value); 1375 1417 this->redraw(); 1376 1418 } … … 1429 1471 1430 1472 #endif /* HAVE_GTK2 */ 1431 PRINT( 4)("%s set to: %d\n", this->title, this->value);1473 PRINT(5)("%s set to: %d\n", this->title, this->value); 1432 1474 } 1433 1475 … … 1518 1560 void OptionLabel::load(char* loadString) 1519 1561 { 1520 PRINTF( 4)("Loading %s: setting to %s\n", this->title, loadString);1562 PRINTF(5)("Loading %s: setting to %s\n", this->title, loadString); 1521 1563 this->setValue(loadString); 1522 1564 } … … 1668 1710 #ifdef HAVE_GTK2 1669 1711 gtk_progress_set_value(GTK_PROGRESS(widget), this->progress*100.0/this->totalSize); 1670 PRINTF( 4)("Progress: %f%%\n", this->progress*100.0/this->totalSize);1712 PRINTF(5)("Progress: %f%%\n", this->progress*100.0/this->totalSize); 1671 1713 #else /* HVE_GTK2 */ 1672 1714 PRINT(0)("Progress: %f%%\n", this->progress*100.0/this->totalSize); -
orxonox/branches/heightMap/src/lib/gui/gui/gui_gtk.h
r4122 r4165 71 71 static void listGroups(Widget* widget); 72 72 static void listGroups(Widget* widget, void* data); 73 static void printHelp(Widget* widget); 73 74 Widget* findGroupByNumber(int* number, unsigned int depth); 74 75 static void setOptions(Widget* widget); -
orxonox/branches/heightMap/src/lib/gui/gui/gui_update.cc
r4122 r4165 55 55 dataDirButton = new Button(CONFIG_NAME_DATADIR); 56 56 dataDirLabel = new OptionLabel(CONFIG_NAME_DATADIR, "unknown"); 57 dataDirLabel->setFlagName("data-dir", "d", 0); 58 dataDirLabel->setDescription("Sets the location of the orxonox' Data-Directory"); 57 59 dataDirLabel->saveability(); 58 60 dataDirDialog = new FileDialog("data-Repos-location"); … … 73 75 this->updateBox->fill(this->autoUpdate); 74 76 this->autoUpdate->setFlagName("update", "u", 0); 77 this->autoUpdate->setDescription("Updates orxonox", "When this option is selected orxonox automatically searches for updates, and if found installs them"); 75 78 this->autoUpdate->saveability(); 76 79 … … 127 130 bool GuiUpdate::getSystemInfo(void) 128 131 { 129 PRINTF( 3)("Grabbing system information\n");132 PRINTF(5)("Grabbing system information\n"); 130 133 this->tmpDir = getenv("TMPDIR"); 131 134 if(!tmpDir) 132 135 this->tmpDir = "/tmp"; 133 PRINTF( 4)("Temporary directory is: %s\n", this->tmpDir);136 PRINTF(5)("Temporary directory is: %s\n", this->tmpDir); 134 137 135 138 #ifdef __WIN32__ … … 138 141 this->homeDir = getenv("HOME"); 139 142 #endif 140 PRINTF(4)("Home directory is %s\n", homeDir); 141 142 this->installDataDir = "/usr/share/games/orxonox"; 143 PRINTF(4)("Installation of orxonox-data will go to this directory: %s\n", this->installDataDir); 143 PRINTF(5)("Home directory is %s\n", homeDir); 144 145 146 this->installDataDir = DEFAULT_DATA_DIR; 147 PRINTF(5)("Installation of orxonox-data will go to this directory: %s\n", this->installDataDir); 144 148 145 149 this->installSourceDir = "/usr/games/bin"; 146 PRINTF( 4)("Installation of orxonox-source will go to this directory: %s\n", this->installSourceDir);150 PRINTF(5)("Installation of orxonox-source will go to this directory: %s\n", this->installSourceDir); 147 151 148 152 this->userName = getenv("USER"); 149 PRINTF( 4)("Logged in username is: %s\n", this->userName);153 PRINTF(5)("Logged in username is: %s\n", this->userName); 150 154 } 151 155 … … 153 157 bool* GuiUpdate::checkForUpdates(void) 154 158 { 155 PRINTF( 3)("checking for new version of orxonox\n");159 PRINTF(4)("checking for new version of orxonox\n"); 156 160 FileInfo updateFileInfo; 157 161 updateFileInfo.fileName = "update_info"; … … 263 267 dataInfo->webRoot = "http://www.orxonox.ethz.ch/files/"; 264 268 dataInfo->localRoot = "./"; 265 PRINTF( 3)("Preparing to download file %s.\n", dataInfo->fileName);269 PRINTF(4)("Preparing to download file %s.\n", dataInfo->fileName); 266 270 downloadWithStyle(dataInfo); 267 271 } … … 348 352 return false; 349 353 } 350 PRINTF( 3)("Downloading.\n");354 PRINTF(4)("Downloading.\n"); 351 355 FileInfo* info =(FileInfo*)fileInfo; 352 356 CURLcode res; … … 396 400 return false; 397 401 } 398 PRINTF( 3)("Downloading.\n");402 PRINTF(4)("Downloading.\n"); 399 403 FileInfo* info =(FileInfo*)fileInfo; 400 404 CURLcode res; … … 464 468 curl_easy_cleanup(curlHandle); 465 469 466 PRINTF( 3)("Closing the downloaded file.\n");470 PRINTF(4)("Closing the downloaded file.\n"); 467 471 fclose(info->fileHandle); 468 472 … … 490 494 gint GuiUpdate::cancelDownload(GtkWidget* w, GdkEventKey* event, void* bar) 491 495 { 492 PRINTF( 4)("Cannot cancle the Downloading process until after this File\n");496 PRINTF(3)("Cannot cancle the Downloading process until after this File\n"); 493 497 } 494 498 #endif /* HAVE_GTK2 */ -
orxonox/branches/heightMap/src/lib/gui/gui/gui_video.cc
r4122 r4165 51 51 fullscreen = new CheckButton(CONFIG_NAME_FULLSCREEN); 52 52 fullscreen->setFlagName("windowed", "q", 1); 53 fullscreen->setDescription("Starts orxonox in windowed mode"); 53 54 fullscreen->saveability(); 54 55 videoBox->fill(fullscreen); … … 57 58 resolution->saveability(); 58 59 resolution->setFlagName("resolution", "r", 0); 60 resolution->setDescription("Sets the resolution of orxonox"); 59 61 videoBox->fill(resolution); 60 62 wireframe = new CheckButton(CONFIG_NAME_WIREFRAME); 61 63 wireframe->setFlagName("wireframe", "w", 0); 64 wireframe->setDescription("Starts orxonox in wireframe mode"); 62 65 wireframe->saveability(); 63 66 videoBox->fill(wireframe); … … 199 202 else{ 200 203 /* Print valid modes */ 201 PRINT( 4)("Available Modes\n");204 PRINT(5)("Available Modes\n"); 202 205 for(i = 0; modes[i] ;++i) 203 206 { 204 207 if (x != modes[i]->w || y != modes[i]->h) 205 208 { 206 PRINT (4)(" %d x %d\n", modes[i]->w, modes[i]->h);209 PRINTF(5)(" %d x %d\n", modes[i]->w, modes[i]->h); 207 210 sprintf(tmpChar, "%dx%d", modes[i]->w, modes[i]->h); 208 211 menu->addItem(tmpChar); -
orxonox/branches/heightMap/src/orxonox.cc
r4122 r4165 38 38 #include "text_engine.h" 39 39 #include "factory.h" 40 #include "benchmark.h" 40 41 41 42 #include <string.h> … … 47 48 /** 48 49 \brief create a new Orxonox 50 51 In this funcitons only global values are set. The game will not be started here. 49 52 */ 50 53 Orxonox::Orxonox () … … 55 58 this->resources = NULL; 56 59 this->localinput = NULL; 60 61 this->argc = 0; 62 this->argv = NULL; 57 63 } 58 64 … … 102 108 int Orxonox::init (int argc, char** argv) 103 109 { 110 this->argc = argc; 111 this->argv = argv; 104 112 // parse command line 105 113 // config file … … 131 139 132 140 GraphicsEngine::getInstance(); 133 141 134 142 return 0; 135 143 } … … 219 227 PRINT(3)("initializing TextEngine\n"); 220 228 TextEngine::getInstance(); 229 230 return 0; 221 231 } 222 232 … … 336 346 */ 337 347 int main(int argc, char** argv) 338 { 339 340 /* reading arguments 341 342 currently supported arguments are: 343 <no args> :: just starts orxonox 344 --benchmark :: start the benchmark without starting orxonox 345 346 this is a preselection: it matches to one of the start* functions, the 347 finetuning is made in those functions. 348 */ 349 350 348 { 349 350 // here the pre-arguments are loaded, these are needed to go either to orxonx itself, Help, or Benchmark. 351 351 int i; 352 352 for(i = 1; i < argc; ++i) 353 353 { 354 if(! strcmp( "--help", argv[i]) ) return startHelp();355 else if(! strcmp( "--benchmark", argv[i])) return startBenchmarks();356 else if(! 357 else PRINTF(2)("Orxonox does not understand the arguments %s\n", argv[i]);354 if(! strcmp( "--help", argv[i]) || !strcmp("-h", argv[i])) return startHelp(argc, argv); 355 else if(!strcmp( "--benchmark", argv[i]) || !strcmp("-b", argv[i])) return startBenchmarks(); 356 else if(!strcmp( "--gui", argv[i]) || !strcmp("-g", argv[i])) showGui = true; 357 // else PRINTF(2)("Orxonox does not understand the arguments %s\n", argv[i]); 358 358 } 359 359 … … 363 363 364 364 365 int startHelp( )365 int startHelp(int argc, char** argv) 366 366 { 367 367 PRINT(0)("orxonox: starts the orxonox game - rules\n"); 368 PRINT(0)("usage: orxonox [arg ]\n\n");368 PRINT(0)("usage: orxonox [arg [arg...]]\n\n"); 369 369 PRINT(0)("valid options:\n"); 370 PRINT(0)(" --benchmark\tstarts the orxonox benchmark\n"); 371 PRINT(0)(" --help \tshows this menu\n"); 372 PRINT(0)(" --gui/-g \tDisplays the Gui on startup\n"); 370 { 371 Gui* gui = new Gui(argc, argv); 372 gui->printHelp(); 373 delete gui; 374 } 375 PRINT(0)(" -b|--benchmark:\t\tstarts the orxonox benchmark\n"); 376 PRINT(0)(" -h|--help:\t\t\tshows this help\n"); 373 377 } 374 378 … … 383 387 if (ResourceManager::isFile("~/.orxonox/orxonox.lock")) 384 388 ResourceManager::deleteFile("~/.orxonox/orxonox.lock"); 385 // char* guiExec = new char[strlen(argv[0])+20];386 // sprintf(guiExec,"%sGui --gui", argv[0]);389 390 // starting the GUI 387 391 Gui* gui = new Gui(argc, argv); 392 gui->startGui(); 393 388 394 if (! gui->startOrxonox) 389 395 return 0; … … 410 416 411 417 } 412 413 #if defined __linux__414 415 #include "list.h"416 #include "world_entity.h"417 #include "vector.h"418 #include "player.h"419 #include "base_object.h"420 421 #include <asm/msr.h>422 #include <linux/timex.h>423 424 425 #define LIST_MAX 1000426 #define VECTOR_MAX 1000000427 #define ITERATIONS 10000428 429 430 int startBenchmarks()431 {432 433 printf("===========================================================\n");434 printf("= BENCHMARKS =\n");435 printf("===========================================================\n");436 printf(" the author is not paying any attention to cacheing effects\n");437 printf(" of the CPU.\n\n");438 printf("[title]\t\t\t\t\t [cycles]\t[loops]\n\n");439 // printf("------------------------------------------------------------\n\n");440 441 // first measure the time overhead:442 unsigned long ini, end, dt, tmp;443 rdtscl(ini); rdtscl(end);444 dt = end - ini;445 446 int type = -1;447 /* type -1 == all448 type 0 == framework449 type 1 == vector450 type 2 == quaternion451 type 3 == lists452 */453 if(type == 0 || type == -1)454 {455 /* framework test*/456 457 printf("Generating Objects:\t\t\t\t\t%i\n", ITERATIONS);458 /* ************WorldEntity class test************** */459 WorldEntity* w = NULL;460 int i = 0;461 unsigned long mittel = 0;462 463 for(i = 0; i < ITERATIONS; ++i)464 {465 rdtscl(ini);466 467 WorldEntity* w = new WorldEntity();468 469 rdtscl(end);470 delete w;471 mittel += (end - ini - dt);472 }473 float mi = mittel / (float)ITERATIONS;474 printf(" Generate a WorldEntity object:\t\t%11.2f\n", mi);475 476 /*477 mittel = 0;478 for(i = 0; i < ITERATIONS; ++i)479 {480 rdtscl(ini);481 482 WorldEntity* w = new Primitive(P_SPHERE);483 484 rdtscl(end);485 delete w;486 mittel += (end - ini - dt);487 }488 mi = mittel / (float)ITERATIONS;489 printf(" Generate a Primitive object:\t\t%11.2f\n", mi);490 */491 492 mittel = 0;493 for(i = 0; i < ITERATIONS; ++i)494 {495 rdtscl(ini);496 497 Vector* v = new Vector();498 499 rdtscl(end);500 delete v;501 mittel += (end - ini - dt);502 }503 mi = mittel / (float)ITERATIONS;504 printf(" Generate a Vector object:\t\t%11.2f\n", mi);505 506 507 mittel = 0;508 for(i = 0; i < ITERATIONS; ++i)509 {510 rdtscl(ini);511 512 Quaternion* q = new Quaternion();513 514 rdtscl(end);515 delete q;516 mittel += (end - ini - dt);517 }518 mi = mittel / (float)ITERATIONS;519 printf(" Generate a Quaternion object:\t\t%11.2f\n", mi);520 521 522 523 524 printf("\nCalling function inline &| virtual, \t\t\t%i\n", ITERATIONS);525 mittel = 0;526 w = new WorldEntity();527 for(i = 0; i < ITERATIONS; ++i)528 {529 rdtscl(ini);530 531 w->tick(0.0f);532 533 rdtscl(end);534 mittel += (end - ini - dt);535 }536 //delete w;537 mi = mittel / (float)ITERATIONS;538 printf(" Virt funct tick() of WE: \t\t%11.2f\n", mi);539 540 541 mittel = 0;542 WorldEntity wo;543 for(i = 0; i < ITERATIONS; ++i)544 {545 rdtscl(ini);546 547 wo.tick(0.0f);548 549 rdtscl(end);550 mittel += (end - ini - dt);551 }552 //delete w;553 mi = mittel / (float)ITERATIONS;554 printf(" Inl virt funct tick() of WE v2: \t%11.2f\n", mi);555 556 557 mittel = 0;558 BaseObject* bo = new BaseObject();559 for(i = 0; i < ITERATIONS; ++i)560 {561 rdtscl(ini);562 563 bo->isFinalized();564 565 rdtscl(end);566 mittel += (end - ini - dt);567 }568 //delete w;569 mi = mittel / (float)ITERATIONS;570 printf(" Inl funct BaseObject::isFinazlized(): \t%11.2f\n", mi);571 572 573 tList<WorldEntity>* list = new tList<WorldEntity>();574 575 576 /* ************Primitvie class test************** */577 list = new tList<WorldEntity>();578 579 580 /*581 mittel = 0;582 w = new Primitive(P_SPHERE);583 for(i = 0; i < ITERATIONS; ++i)584 {585 rdtscl(ini);586 587 w->tick(0.0f);588 589 rdtscl(end);590 mittel += (end - ini - dt);591 }592 mi = mittel / (float)ITERATIONS;593 printf(" Call function tick() of Prim:\t\t%11.2f\n", mi);594 */595 596 }597 598 if(type == 1 || type == -1)599 {600 printf("\nDoing some simple vector operations: \t\t\t%i\n", VECTOR_MAX);601 /* vector test */602 Vector* a = new Vector(1.3, 5.3, 4.1);603 Vector* b = new Vector(0.4, 2.5, 6.2);604 Vector* c = new Vector();605 606 unsigned long mittel, ini, end;607 float mi;608 int i = 0;609 // addition610 mittel = 0;611 for(i = 0; i < VECTOR_MAX; ++i)612 {613 rdtscl(ini);614 615 *c = *a + *b;616 617 rdtscl(end);618 mittel += (end - ini - dt);619 }620 mi = mittel / (float)VECTOR_MAX;621 printf(" Addition of two vectors:\t\t%11.2f\n", mi);622 623 // multiplikation624 625 mittel = 0;626 for(i = 0; i < VECTOR_MAX; ++i)627 {628 rdtscl(ini);629 630 *c = a->cross( *b);631 632 rdtscl(end);633 mittel += (end - ini - dt);634 }635 mi = mittel / (float)VECTOR_MAX;636 printf(" CrossMult of two vectors:\t\t%11.2f\n", mi);637 638 }639 if( type == 2 || type == -1)640 {641 /* quaternion test */642 printf("\nDoing some simple quaternion operations: \t\t%i\n", VECTOR_MAX);643 /* vector test */644 Quaternion* a = new Quaternion();645 Quaternion* b = new Quaternion();646 Quaternion* c = new Quaternion();647 648 unsigned long mittel, ini, end;649 float mi;650 int i = 0;651 // quaternion generieren mit spez konstruktor652 mittel = 0;653 Vector* qa = new Vector(4.6, 9.3, 0.4);654 Vector* qb = new Vector(3.5, 6.1, 4.3);655 for(i = 0; i < VECTOR_MAX; ++i)656 {657 rdtscl(ini);658 659 Quaternion* qu = new Quaternion(*qa, *qb);660 661 rdtscl(end);662 delete qu;663 mittel += (end - ini - dt);664 }665 delete a;666 delete b;667 mi = mittel / (float)VECTOR_MAX;668 printf(" Gen. quatern. betw. two vectors:\t%11.2f\n", mi);669 670 671 // multiplication672 mittel = 0;673 for(i = 0; i < VECTOR_MAX; ++i)674 {675 rdtscl(ini);676 677 *c = *a * *b;678 679 rdtscl(end);680 mittel += (end - ini - dt);681 }682 mi = mittel / (float)VECTOR_MAX;683 printf(" Multiplying two quat.(=rot): a * b\t%11.2f\n", mi);684 685 686 687 // rotating a vector by a quaternion688 mittel = 0;689 for(i = 0; i < VECTOR_MAX; ++i)690 {691 rdtscl(ini);692 693 *qa = a->apply(*qb);694 695 rdtscl(end);696 mittel += (end - ini - dt);697 }698 mi = mittel / (float)VECTOR_MAX;699 printf(" Rot a vec by a quat: q->apply(v)\t%11.2f\n", mi);700 701 702 703 // generate rotation matrix704 mittel = 0;705 float matrix[4][4];706 for(i = 0; i < VECTOR_MAX; ++i)707 {708 rdtscl(ini);709 710 a->matrix(matrix);711 712 rdtscl(end);713 mittel += (end - ini - dt);714 }715 mi = mittel / (float)VECTOR_MAX;716 printf(" Generate rot matrix: q->matrix(m)\t%11.2f\n", mi);717 }718 if( type == 3 || type == -1)719 {720 /* list tests*/721 printf("\nList operations tests: \t\t\t\t\t%i\n", LIST_MAX);722 tList<char>* list = new tList<char>();723 char* name;724 725 printf(" Adding[1..10] elements to list, found:\n");726 list->add("1");727 list->add("2");728 list->add("3");729 list->add("4");730 list->add("5");731 list->add("6");732 list->add("7");733 list->add("8");734 list->add("9");735 list->add("10");736 737 /*give list out */738 tIterator<char>* iterator = list->getIterator();739 name = iterator->nextElement();740 printf(" List Elements: \t\t");741 while( name != NULL)742 {743 printf("%s,", name);744 name = iterator->nextElement();745 }746 delete iterator;747 printf("\n");748 749 750 /*removing some elements from the list*/751 printf(" Removing elements [2,3,6,8,10], adding [11] now found:\n");752 list->remove("2");753 list->remove("3");754 list->remove("6");755 list->remove("8");756 list->remove("10");757 list->add("11");758 /*give list out */759 iterator = list->getIterator();760 name = iterator->nextElement();761 printf(" List Elements: \t\t");762 while( name != NULL)763 {764 printf("%s,", name);765 name = iterator->nextElement();766 }767 delete iterator;768 printf("\n");769 770 delete list;771 printf("\nChecking list performance:\t\t\t\t%i\n", LIST_MAX);772 773 tList<int>* plist = new tList<int>();774 unsigned long mittel, ini, end;775 float mi;776 int i = 0;777 mittel = 0;778 for(i = 0; i < LIST_MAX; ++i)779 {780 rdtscl(ini);781 782 plist->add(&i);783 784 rdtscl(end);785 mittel += (end - ini - dt);786 }787 mi = mittel / (float)LIST_MAX;788 printf(" Adding reference to list:\t\t%11.2f\n", mi);789 790 mittel = 0;791 for(i = 0; i < LIST_MAX; ++i)792 {793 rdtscl(ini);794 795 plist->remove(&i);796 797 rdtscl(end);798 mittel += (end - ini - dt);799 }800 mi = mittel / (float)LIST_MAX;801 printf(" Removing 1st reference from list:\t%11.2f\n", mi);802 803 804 printf("\nList operations tests: \t\t\t\t\t%i\n", LIST_MAX);805 list = new tList<char>();806 printf(" Adding[1..10] elements to list, found:\n");807 list->add("1");808 list->add("2");809 list->add("3");810 list->add("4");811 list->add("5");812 list->add("6");813 list->add("7");814 list->add("8");815 list->add("9");816 list->add("10");817 818 /*give list out */819 iterator = list->getIterator();820 name = iterator->nextElement();821 printf(" List Elements: \t\t");822 while( name != NULL)823 {824 printf("%s,", name);825 name = iterator->nextElement();826 }827 delete iterator;828 printf("\n");829 830 831 int c = 0;832 printf(" Going trough list with nextElement(el) func: ");833 name = list->firstElement();834 while(c < 20)835 {836 printf("%s,", name);837 name = list->nextElement(name);838 c++;839 }840 printf("\n");841 842 843 844 }845 846 }847 848 #else849 850 int startBenchmarks()851 {852 PRINTF(1)("Benchmark is not implemented in this system\n");853 }854 855 #endif -
orxonox/branches/heightMap/src/orxonox.h
r3660 r4165 39 39 Uint32 lastframe; //!< Time of the last Frame 40 40 41 unsigned int argc; //!< Count of Arguments of orxonox 42 char** argv; //!< Values of th Arguments of orxonox. 43 41 44 void getConfigFile (int argc, char** argv); 42 45 43 // main loop functions 44 // void synchronize (); 45 //void handle_input (); 46 //void time_slice (); 47 //void collision (); 48 //void display (); 49 50 // subsystem initialization 46 // subsystem initialization 51 47 int initVideo (); 52 48 int initSound (); … … 75 71 }; 76 72 77 int startHelp( void);73 int startHelp(int argc, char** argv); 78 74 int startOrxonox(int argc, char** argv); 79 int startBenchmarks(void);80 75 81 76 #endif /* _ORXONOX_H */ -
orxonox/branches/heightMap/src/story_entities/world.cc
r4122 r4165 197 197 cn->reset(); 198 198 199 ResourceManager::getInstance()->debug();200 ResourceManager::getInstance()->unloadAllByPriority(RP_LEVEL);201 ResourceManager::getInstance()->debug();202 203 199 delete WorldInterface::getInstance(); 204 200 … … 209 205 TextEngine::getInstance()->flush(); 210 206 211 AnimationPlayer::getInstance()->debug();212 207 delete AnimationPlayer::getInstance(); // this should be at the end of the unloading sequence. 213 208 //delete garbagecollecor 214 209 //delete animator 215 210 216 211 ResourceManager::getInstance()->unloadAllByPriority(RP_LEVEL); 217 212 } 218 213 … … 844 839 this->glmis = new GLMenuImageScreen(); 845 840 this->glmis->init(); 846 glmis->setBackgroundImage("pictures/load_screen.jpg");847 841 this->glmis->setMaximum(8); 848 842 // this->glmis->draw(); … … 1118 1112 1119 1113 /* function to let all entities tick (iterate through list) */ 1120 float seconds =this->dt / 1000.0;1121 this->gameTime += seconds;1114 this->dtS = (float)this->dt / 1000.0; 1115 this->gameTime += this->dtS; 1122 1116 //entity = entities->enumerate(); 1123 1117 tIterator<WorldEntity>* iterator = this->entities->getIterator(); … … 1125 1119 while( entity != NULL) 1126 1120 { 1127 entity->tick ( seconds);1121 entity->tick (this->dtS); 1128 1122 entity = iterator->nextElement(); 1129 1123 } … … 1133 1127 this->trackManager->tick(this->dt); 1134 1128 this->localCamera->tick(this->dt); 1135 this->garbageCollector->tick( seconds);1136 1137 AnimationPlayer::getInstance()->tick( seconds);1129 this->garbageCollector->tick(this->dtS); 1130 1131 AnimationPlayer::getInstance()->tick(this->dtS); 1138 1132 } 1139 1133 this->lastFrame = currentFrame; … … 1150 1144 { 1151 1145 this->garbageCollector->update(); 1152 this->nullParent->update ( dt);1146 this->nullParent->update (this->dtS); 1153 1147 } 1154 1148 -
orxonox/branches/heightMap/src/story_entities/world.h
r4122 r4165 94 94 Uint32 lastFrame; //!< last time of frame 95 95 Uint32 dt; //!< time needed to calculate this frame 96 float dtS; //!< The time needed for caluculations in seconds 96 97 double gameTime; //!< this is where the game time is saved 97 98 bool bQuitOrxonox; //!< quit this application -
orxonox/branches/heightMap/src/subprojects/Makefile.in
r4122 r4165 113 113 PACKAGE_VERSION = @PACKAGE_VERSION@ 114 114 PATH_SEPARATOR = @PATH_SEPARATOR@ 115 PKG_CONFIG = @PKG_CONFIG@ 115 116 RANLIB = @RANLIB@ 116 117 SET_MAKE = @SET_MAKE@ … … 176 177 esac; \ 177 178 done; \ 178 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/subprojects/Makefile'; \179 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/subprojects/Makefile'; \ 179 180 cd $(top_srcdir) && \ 180 $(AUTOMAKE) -- gnusrc/subprojects/Makefile181 $(AUTOMAKE) --foreign src/subprojects/Makefile 181 182 .PRECIOUS: Makefile 182 183 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/heightMap/src/subprojects/testmain/Makefile.in
r4122 r4165 128 128 PACKAGE_VERSION = @PACKAGE_VERSION@ 129 129 PATH_SEPARATOR = @PATH_SEPARATOR@ 130 PKG_CONFIG = @PKG_CONFIG@ 130 131 RANLIB = @RANLIB@ 131 132 SET_MAKE = @SET_MAKE@ … … 196 197 esac; \ 197 198 done; \ 198 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/subprojects/testmain/Makefile'; \199 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/subprojects/testmain/Makefile'; \ 199 200 cd $(top_srcdir) && \ 200 $(AUTOMAKE) -- gnusrc/subprojects/testmain/Makefile201 $(AUTOMAKE) --foreign src/subprojects/testmain/Makefile 201 202 .PRECIOUS: Makefile 202 203 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/heightMap/src/world_entities/skybox.cc
r4122 r4165 66 66 PRINTF(0)("SkyBox is missing a proper 'MaterialSet'\n"); 67 67 } 68 if( this-> model == NULL)68 if( this->skyModel == NULL) 69 69 { 70 70 PRINTF(0)("SkyBox model '%s' could not be loaded\n", string); … … 76 76 { 77 77 this->setClassName("SkyBox"); 78 this->skyModel = NULL; 78 79 this->material = new Material*[6]; 79 for (int i = 0; i < 6; i++)80 for (int i = 0; i < 6; i++) 80 81 { 81 82 this->material[i] = new Material(); … … 100 101 SkyBox::~SkyBox() 101 102 { 102 PRINTF(5)("Deleting theSkyBox\n");103 PRINTF(5)("Deleting SkyBox\n"); 103 104 for (int i = 0; i < 6; i++) 104 105 delete this->material[i]; … … 179 180 glTranslatef(r.x, r.y, r.z); 180 181 181 this-> model->draw();182 this->skyModel->draw(); 182 183 183 184 glPopMatrix(); … … 192 193 void SkyBox::rebuild() 193 194 { 194 if (this-> model)195 delete model;196 model = new Model();197 198 model->addVertex (-0.5*size, -0.5*size, 0.5*size);199 model->addVertex (0.5*size, -0.5*size, 0.5*size);200 model->addVertex (-0.5*size, 0.5*size, 0.5*size);201 model->addVertex (0.5*size, 0.5*size, 0.5*size);202 model->addVertex (-0.5*size, 0.5*size, -0.5*size);203 model->addVertex (0.5*size, 0.5*size, -0.5*size);204 model->addVertex (-0.5*size, -0.5*size, -0.5*size);205 model->addVertex (0.5*size, -0.5*size, -0.5*size);206 207 model->addVertexTexture (0.0, 0.0);208 model->addVertexTexture (1.0, 0.0);209 model->addVertexTexture (1.0, 1.0);210 model->addVertexTexture (0.0, 1.0);211 212 model->addVertexNormal (0.0, 0.0, 1.0);213 model->addVertexNormal (0.0, 1.0, 0.0);214 model->addVertexNormal (0.0, 0.0, -1.0);215 model->addVertexNormal (0.0, -1.0, 0.0);216 model->addVertexNormal (1.0, 0.0, 0.0);217 model->addVertexNormal (-1.0, 0.0, 0.0);218 219 model->setMaterial(material[0]);220 model->addFace (4, VERTEX_TEXCOORD_NORMAL, 2,1,3, 3,2,3, 5,3,3, 4,0,3); // top221 model->setMaterial(material[1]);222 model->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,3,1, 7,0,1, 1,1,1, 0,2,1); // bottom223 model->setMaterial(material[2]);224 model->addFace (4, VERTEX_TEXCOORD_NORMAL, 0,0,2, 1,1,2, 3,2,2, 2,3,2); // left225 model->setMaterial(material[3]);226 model->addFace (4, VERTEX_TEXCOORD_NORMAL, 4,2,0, 5,3,0, 7,0,0, 6,1,0); // right227 model->setMaterial(material[4]);228 model->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,0,5, 7,1,5, 5,2,5, 3,3,6); // front229 model->setMaterial(material[5]);230 model->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,0,4, 0,1,4, 2,2,4, 4,3,4); // back195 if (this->skyModel) 196 delete skyModel; 197 skyModel = new Model(); 198 199 this->skyModel->addVertex (-0.5*size, -0.5*size, 0.5*size); 200 this->skyModel->addVertex (0.5*size, -0.5*size, 0.5*size); 201 this->skyModel->addVertex (-0.5*size, 0.5*size, 0.5*size); 202 this->skyModel->addVertex (0.5*size, 0.5*size, 0.5*size); 203 this->skyModel->addVertex (-0.5*size, 0.5*size, -0.5*size); 204 this->skyModel->addVertex (0.5*size, 0.5*size, -0.5*size); 205 this->skyModel->addVertex (-0.5*size, -0.5*size, -0.5*size); 206 this->skyModel->addVertex (0.5*size, -0.5*size, -0.5*size); 207 208 this->skyModel->addVertexTexture (0.0, 0.0); 209 this->skyModel->addVertexTexture (1.0, 0.0); 210 this->skyModel->addVertexTexture (1.0, 1.0); 211 this->skyModel->addVertexTexture (0.0, 1.0); 212 213 this->skyModel->addVertexNormal (0.0, 0.0, 1.0); 214 this->skyModel->addVertexNormal (0.0, 1.0, 0.0); 215 this->skyModel->addVertexNormal (0.0, 0.0, -1.0); 216 this->skyModel->addVertexNormal (0.0, -1.0, 0.0); 217 this->skyModel->addVertexNormal (1.0, 0.0, 0.0); 218 this->skyModel->addVertexNormal (-1.0, 0.0, 0.0); 219 220 this->skyModel->setMaterial(material[0]); 221 this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 2,1,3, 3,2,3, 5,3,3, 4,0,3); // top 222 this->skyModel->setMaterial(material[1]); 223 this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,3,1, 7,0,1, 1,1,1, 0,2,1); // bottom 224 this->skyModel->setMaterial(material[2]); 225 this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 0,0,2, 1,1,2, 3,2,2, 2,3,2); // left 226 this->skyModel->setMaterial(material[3]); 227 this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 4,2,0, 5,3,0, 7,0,0, 6,1,0); // right 228 this->skyModel->setMaterial(material[4]); 229 this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,0,5, 7,1,5, 5,2,5, 3,3,6); // front 230 this->skyModel->setMaterial(material[5]); 231 this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,0,4, 0,1,4, 2,2,4, 4,3,4); // back 231 232 232 model->finalize();233 } 233 this->skyModel->finalize(); 234 } -
orxonox/branches/heightMap/src/world_entities/skybox.h
r4122 r4165 39 39 void rebuild(); 40 40 41 Model* skyModel; //!< A Model for the Sky. This must not be the same as the Model from WorldEntity, because it is not alocated through the ResourceManager. 41 42 Material **material; //!< Materials for the SkyBox. sorted by number (0-5) top, bottom, left, right, front, back 42 43 float size; //!< Size of the SkyBox. This should match the frustum maximum range. -
orxonox/branches/heightMap/src/world_entities/terrain.cc
r4090 r4165 109 109 void Terrain::init(void) 110 110 { 111 112 113 111 this->setClassName ("Terrain"); 112 113 this->objectList = 0; 114 114 } 115 115 … … 130 130 glMultMatrixf((float*)matrix); 131 131 132 if (objectList) 133 glCallList(objectList); 134 else if (model) 135 model->draw(); 136 // this->model->draw(); 132 if (this->objectList) 133 glCallList(this->objectList); 134 else if (this->model) 135 this->model->draw(); 137 136 glPopMatrix(); 138 137 }
Note: See TracChangeset
for help on using the changeset viewer.