- Timestamp:
- 12/05/06 14:40:12 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/src/ReflectionTest/include/ReflectionTest.h
r1850 r1856 32 32 int scene = 1; 33 33 FrameCapture* capture; 34 35 bool multiplebounce = true; 34 36 35 37 // Listener class for frame updates … … 47 49 this->mMoveSpeed = 0.1; 48 50 framecount = 0; 49 this->objectNode = objectNode; 51 this->objectNode = objectNode; 50 52 51 53 } … … 79 81 //objectNode->scale(1.1,1.1,1.1); 80 82 objectNode->rotate(Vector3(0,0,1), Degree(rotate)); 81 mTimeUntilNextToggle = 1;83 82 84 } 83 85 if (mInputDevice->isKeyDown(KC_DIVIDE)) … … 85 87 //objectNode->scale(1.0/1.1,1.0/1.1,1.0/1.1); 86 88 objectNode->rotate(Vector3(1,0,0), Degree(rotate)); 87 mTimeUntilNextToggle = 1;89 88 90 } 89 91 if (mInputDevice->isKeyDown(KC_ADD)) … … 161 163 capture->setSaving(); 162 164 capture->playEvent(); 165 mTimeUntilNextToggle = 1; 166 } 167 if (mInputDevice->isKeyDown(KC_V) && mTimeUntilNextToggle <= 0) 168 { 169 multiplebounce = ! multiplebounce; 170 if(multiplebounce) 171 { 172 MaterialPtr mat = MaterialManager::getSingleton().getByName("MetalTeapotMultipleBounce"); 173 mat->getTechnique(0)->getPass(0)->getFragmentProgramParameters()->setNamedConstant("SingleBounce", 0.0f); 174 } 175 else 176 { 177 MaterialPtr mat = MaterialManager::getSingleton().getByName("MetalTeapotMultipleBounce"); 178 mat->getTechnique(0)->getPass(0)->getFragmentProgramParameters()->setNamedConstant("SingleBounce", 1.0f); 179 } 180 163 181 mTimeUntilNextToggle = 1; 164 182 } … … 281 299 OgreIlluminationManager::getSingleton().initTechniques(); 282 300 } 283 284 void createScene1(void) 301 void createScene1(void) 285 302 { 286 303 SceneNode* rootNode = mSceneMgr->getRootSceneNode();
Note: See TracChangeset
for help on using the changeset viewer.