Changeset 6169 in orxonox.OLD for branches/christmas_branche/src/lib
- Timestamp:
- Dec 20, 2005, 12:22:17 AM (19 years ago)
- Location:
- branches/christmas_branche/src/lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/christmas_branche/src/lib/event/event_handler.cc
r6167 r6169 259 259 { 260 260 this->eventsGrabbed = grabEvents; 261 //if(!grabEvents)262 //SDL_WM_GrabInput(SDL_GRAB_OFF);263 //else264 //SDL_WM_GrabInput(SDL_GRAB_ON);261 if(!grabEvents) 262 SDL_WM_GrabInput(SDL_GRAB_OFF); 263 else 264 SDL_WM_GrabInput(SDL_GRAB_ON); 265 265 } 266 266 -
branches/christmas_branche/src/lib/graphics/importer/md2Model.cc
r6022 r6169 156 156 { 157 157 this->animationState.localTime += time; 158 159 if( likely(this->animationState.localTime > 0.0)) 160 this->animate(); 161 162 static sVec3D verticesList[MD2_MAX_VERTICES]; /* performance: created only once in a lifetime */ 163 this->processLighting(); 164 this->interpolate(verticesList); 158 165 } 159 166 … … 164 171 * FIXME 165 172 */ 166 void MD2Model::draw() 167 { 168 if( likely(this->animationState.localTime > 0.0)) 169 this->animate(); 170 171 glPushMatrix(); 173 void MD2Model::draw() const 174 { 175 // glPushMatrix(); 172 176 173 177 this->renderFrame(); 174 178 175 glPopMatrix();179 // glPopMatrix(); 176 180 } 177 181 … … 180 184 \brief this is an internal function to render this special frame selected by animate() 181 185 */ 182 void MD2Model::renderFrame() 186 void MD2Model::renderFrame() const 183 187 { 184 188 static sVec3D verticesList[MD2_MAX_VERTICES]; /* performance: created only once in a lifetime */ … … 191 195 glCullFace(GL_BACK); 192 196 193 this->processLighting(); 194 this->interpolate(verticesList); 197 195 198 this->data->material->select(); 196 199 … … 406 409 } 407 410 } 411 PRINTF(4)("Finished loading the md2 file\n"); 408 412 409 413 delete [] buffer; -
branches/christmas_branche/src/lib/graphics/importer/md2Model.h
r6022 r6169 143 143 virtual ~MD2Model(); 144 144 145 v oid draw();145 virtual void draw() const; 146 146 147 147 void setAnim(int type); … … 160 160 void processLighting(); 161 161 void interpolate(sVec3D* verticesList); 162 void renderFrame() ;162 void renderFrame() const; 163 163 164 164
Note: See TracChangeset
for help on using the changeset viewer.