Changeset 821
- Timestamp:
- 04/25/06 13:13:16 (19 years ago)
- Location:
- GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE
- Files:
-
- 8 added
- 5 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCBillboardViewMode.h
r786 r821 14 14 { 15 15 showDebugOverlay(false); 16 mReloadedTextures = false; 16 epsilonX = 0.0; 17 epsilonY = 0.0; 18 factor = 1.0 / 255.0; 17 19 } 18 20 … … 23 25 bool frameStarted(const Ogre::FrameEvent& evt, Ogre::InputReader *inputReader) 24 26 { 25 mWindow->getViewport(0)->setBackgroundColour(Ogre::ColourValue(0.0, 0.0, 0.0, 1.0)); 26 27 //if (!mReloadedTextures) 28 //{ 29 // for (unsigned int iSubEntity = 0; iSubEntity < mBillboardCloudEntity->getNumSubEntities(); iSubEntity++) 30 // { 31 // Ogre::MaterialPtr materialPtr = Ogre::MaterialManager::getSingleton().getByName(mBillboardCloudEntity->getSubEntity(iSubEntity)->getMaterialName()); 32 // Ogre::LogManager::getSingleton().logMessage("Reloading texture:" + materialPtr->getTechnique(0)->getPass(0)->getTextureUnitState(0)->getTextureName()); 33 34 // Ogre::TexturePtr texturePtr = Ogre::TextureManager::getSingleton().getByName(materialPtr->getTechnique(0)->getPass(0)->getTextureUnitState(0)->getTextureName()); 35 // texturePtr->reload(); 36 // materialPtr->reload(); 37 // } 38 // mReloadedTextures = true; 39 //} 27 showDebugOverlay(true); 28 mWindow->getViewport(0)->setBackgroundColour(Ogre::ColourValue(0.0, 0.0, 0.0, 1.0)); 29 mEpsilonText = Ogre::String("Epsilon:") + Ogre::StringConverter::toString(epsilonX) + Ogre::String(",") + Ogre::StringConverter::toString(epsilonY); 30 mWindow->setDebugText(mEpsilonText); 40 31 41 32 return OgreFrameListenerMode::frameStarted(evt, inputReader); 42 33 } 43 34 35 virtual bool processUnbufferedKeyInput(const Ogre::FrameEvent& evt) 36 { 37 if (mInputDevice->isKeyDown(Ogre::KC_1)) 38 { 39 epsilonX = epsilonX + factor; 40 } 41 42 if (mInputDevice->isKeyDown(Ogre::KC_2)) 43 { 44 epsilonX = epsilonX - factor; 45 } 46 47 if (mInputDevice->isKeyDown(Ogre::KC_3)) 48 { 49 epsilonY = epsilonY + factor; 50 } 51 52 if (mInputDevice->isKeyDown(Ogre::KC_4)) 53 { 54 epsilonY = epsilonY - factor; 55 } 56 57 mFragParams = mBillboardCloudEntity->getSubEntity(0)->getMaterial()->getBestTechnique()->getPass(0)->getFragmentProgramParameters(); 58 mFragParams->setNamedConstant("epsilonX", epsilonX); 59 mFragParams->setNamedConstant("epsilonY", epsilonY); 60 61 if (mInputDevice->isKeyDown(Ogre::KC_A)) 62 { 63 // Move camera left 64 mTranslateVector.x = -mMoveScale; 65 } 66 67 if (mInputDevice->isKeyDown(Ogre::KC_D)) 68 { 69 // Move camera RIGHT 70 mTranslateVector.x = mMoveScale; 71 } 72 73 /* Move camera forward by keypress. */ 74 if (mInputDevice->isKeyDown(Ogre::KC_UP) || mInputDevice->isKeyDown(Ogre::KC_W) ) 75 { 76 mTranslateVector.z = -mMoveScale; 77 } 78 79 /* Move camera backward by keypress. */ 80 if (mInputDevice->isKeyDown(Ogre::KC_DOWN) || mInputDevice->isKeyDown(Ogre::KC_S) ) 81 { 82 mTranslateVector.z = mMoveScale; 83 } 84 85 if (mInputDevice->isKeyDown(Ogre::KC_PGUP)) 86 { 87 // Move camera up 88 mTranslateVector.y = mMoveScale; 89 } 90 91 if (mInputDevice->isKeyDown(Ogre::KC_PGDOWN)) 92 { 93 // Move camera down 94 mTranslateVector.y = -mMoveScale; 95 } 96 97 if (mInputDevice->isKeyDown(Ogre::KC_RIGHT)) 98 { 99 mCamera->yaw(-mRotScale); 100 } 101 102 if (mInputDevice->isKeyDown(Ogre::KC_LEFT)) 103 { 104 mCamera->yaw(mRotScale); 105 } 106 107 // see if switching is on, and you want to toggle 108 if (mInputTypeSwitchingOn && mInputDevice->isKeyDown(Ogre::KC_M) && mTimeUntilNextToggle <= 0) 109 { 110 switchMouseMode(); 111 mTimeUntilNextToggle = 1; 112 } 113 114 if (mInputTypeSwitchingOn && mInputDevice->isKeyDown(Ogre::KC_K) && mTimeUntilNextToggle <= 0) 115 { 116 // must be going from immediate keyboard to buffered keyboard 117 switchKeyMode(); 118 mTimeUntilNextToggle = 1; 119 } 120 if (mInputDevice->isKeyDown(Ogre::KC_F) && mTimeUntilNextToggle <= 0) 121 { 122 mStatsOn = !mStatsOn; 123 showDebugOverlay(mStatsOn); 124 125 mTimeUntilNextToggle = 1; 126 } 127 if (mInputDevice->isKeyDown(Ogre::KC_T) && mTimeUntilNextToggle <= 0) 128 { 129 switch(mFiltering) 130 { 131 case Ogre::TFO_BILINEAR: 132 mFiltering = Ogre::TFO_TRILINEAR; 133 mAniso = 1; 134 break; 135 case Ogre::TFO_TRILINEAR: 136 mFiltering = Ogre::TFO_ANISOTROPIC; 137 mAniso = 8; 138 break; 139 case Ogre::TFO_ANISOTROPIC: 140 mFiltering = Ogre::TFO_BILINEAR; 141 mAniso = 1; 142 break; 143 default: 144 break; 145 } 146 Ogre::MaterialManager::getSingleton().setDefaultTextureFiltering(mFiltering); 147 Ogre::MaterialManager::getSingleton().setDefaultAnisotropy(mAniso); 148 149 150 showDebugOverlay(mStatsOn); 151 152 mTimeUntilNextToggle = 1; 153 } 154 155 if (mInputDevice->isKeyDown(Ogre::KC_SYSRQ) && mTimeUntilNextToggle <= 0) 156 { 157 char tmp[20]; 158 sprintf(tmp, "screenshot_%d.png", ++mNumScreenShots); 159 mWindow->writeContentsToFile(tmp); 160 mTimeUntilNextToggle = 0.5; 161 mWindow->setDebugText(Ogre::String("Wrote ") + tmp); 162 } 163 164 if (mInputDevice->isKeyDown(Ogre::KC_R) && mTimeUntilNextToggle <=0) 165 { 166 mSceneDetailIndex = (mSceneDetailIndex+1)%3 ; 167 switch(mSceneDetailIndex) { 168 case 0 : mCamera->setPolygonMode(Ogre::PM_SOLID) ; break ; 169 case 1 : mCamera->setPolygonMode(Ogre::PM_WIREFRAME) ; break ; 170 case 2 : mCamera->setPolygonMode(Ogre::PM_POINTS) ; break ; 171 } 172 mTimeUntilNextToggle = 0.5; 173 } 174 175 static bool displayCameraDetails = false; 176 if (mInputDevice->isKeyDown(Ogre::KC_P) && mTimeUntilNextToggle <= 0) 177 { 178 displayCameraDetails = !displayCameraDetails; 179 mTimeUntilNextToggle = 0.5; 180 if (!displayCameraDetails) 181 mWindow->setDebugText(""); 182 } 183 if (displayCameraDetails) 184 { 185 // Print camera details 186 mWindow->setDebugText("P: " + Ogre::StringConverter::toString(mCamera->getDerivedPosition()) + " " + 187 "O: " + Ogre::StringConverter::toString(mCamera->getDerivedOrientation())); 188 } 189 190 // Return true to continue rendering 191 return true; 192 } 44 193 void setBillboardCloudMeshName(Ogre::String billboardCloudMeshName) 45 194 { … … 55 204 mBillboardCloudEntity = mSceneMgr->createEntity("chestnutLeavesBillboardCloudGrouped.mesh", "chestnutLeavesBillboardCloudGrouped.mesh"); 56 205 //mBillboardCloudEntity = mSceneMgr->createEntity("mapleLeavesBillboardCloudGrouped.mesh", "mapleLeavesBillboardCloudGrouped.mesh"); 206 //mBillboardCloudEntity = mSceneMgr->createEntity("prunusLeavesBillboardCloudGrouped.mesh", "prunusLeavesBillboardCloudGrouped.mesh"); 57 207 sNode->attachObject(mBillboardCloudEntity); 58 208 sNode->rotate(Ogre::Vector3::UNIT_X, Ogre::Radian(Ogre::Degree(-90.0))); … … 64 214 Ogre::Entity *mBillboardCloudEntity; 65 215 66 bool mReloadedTextures; 216 Ogre::Real epsilonX; 217 218 Ogre::Real epsilonY; 219 220 Ogre::Real factor; 221 222 Ogre::String mEpsilonText; 223 224 Ogre::GpuProgramParametersSharedPtr mFragParams; 67 225 }; 68 226 -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCClusterViewMode.h
r786 r821 22 22 bool frameStarted(const Ogre::FrameEvent& evt, Ogre::InputReader *inputReader) 23 23 { 24 showDebugOverlay(true); 24 25 mWindow->getViewport(0)->setBackgroundColour(Ogre::ColourValue(0.0, 0.0, 0.0, 1.0)); 25 26 … … 40 41 Ogre::Entity* eLeafClustersGrouped = mSceneMgr->createEntity("chestnutLeafClustersGrouped.mesh", "chestnutLeafClustersGrouped.mesh"); 41 42 //Ogre::Entity* eLeafClustersGrouped = mSceneMgr->createEntity("mapleLeafClustersGrouped.mesh", "mapleLeafClustersGrouped.mesh"); 43 //Ogre::Entity* eLeafClustersGrouped = mSceneMgr->createEntity("prunusLeafClustersGrouped.mesh", "prunusLeafClustersGrouped.mesh"); 42 44 sNode->attachObject(eLeafClustersGrouped); 43 45 sNode->rotate(Ogre::Vector3::UNIT_X, Ogre::Radian(Ogre::Degree(-90.0))); -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/media/general/general.program
r786 r821 27 27 } 28 28 29 fragment_program diffuse_FP20 cg29 vertex_program diffuseTexturing_VP20 cg 30 30 { 31 source diffuse_FP20.cg 31 source diffuseTexturing_VP20.cg 32 entry_point main_vp 33 profiles arbvp1 vs_2_0 34 } 35 36 fragment_program diffuseTexturing_FP20 cg 37 { 38 source diffuseTexturing_FP20.cg 32 39 entry_point main_fp 33 40 profiles ps_2_0 arbfp1 … … 41 48 } 42 49 43 vertex_program indirectTexturing _VP20 cg50 vertex_program indirectTexturingDefault_VP20 cg 44 51 { 45 source indirectTexturing _VP20.cg52 source indirectTexturingDefault_VP20.cg 46 53 entry_point main_vp 47 profiles vs_2_0 arbvp1 54 profiles vs_2_0 arbvp1 48 55 } 49 56 50 fragment_program indirectTexturing _FP20 cg57 fragment_program indirectTexturingDefault_FP20 cg 51 58 { 52 source indirectTexturing _FP20.cg59 source indirectTexturingDefault_FP20.cg 53 60 entry_point main_fp 54 61 profiles ps_2_0 arbfp1 55 62 } 56 63 57 vertex_program indirectTexturing _hlsl_VP20 hlsl64 vertex_program indirectTexturingDefault_hlsl_VP20 hlsl 58 65 { 59 source indirectTexturing _hlsl_VP20.shd66 source indirectTexturingDefault_hlsl_VP20.shd 60 67 entry_point main_vp 61 68 target vs_2_0 62 69 } 63 70 64 fragment_program indirectTexturing _hlsl_FP20 hlsl71 fragment_program indirectTexturingDefault_hlsl_FP20 hlsl 65 72 { 66 source indirectTexturing _hlsl_FP20.shd73 source indirectTexturingDefault_hlsl_FP20.shd 67 74 entry_point main_fp 68 75 target ps_2_0 … … 75 82 profiles ps_2_0 arbfp1 76 83 } 84 85 vertex_program indirectTexturingDefault_glsl_VP20 glsl 86 { 87 source indirectTexturingDefault_glsl_VP20.shd 88 } 89 90 fragment_program indirectTexturingDefault_glsl_FP20 glsl 91 { 92 source indirectTexturingDefault_glsl_FP20.shd 93 } -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/media/general/indirectTexturingDebugTexCoordCorrespondence_FP20.cg
r786 r821 1 1 sampler indirectTexture: register(s0); 2 2 3 void main_fp(float2 posS: TEXCOORD0,4 float2 posT: TEXCOORD1,3 void main_fp(float2 texCoord: TEXCOORD0, 4 float2 subTexCoord: TEXCOORD1, 5 5 out float4 ocolor: COLOR, 6 6 uniform sampler2D indirectTexture) 7 7 { 8 8 9 float2 coords = posS + (float2(1.0, 1.0) - tex2D(indirectTexture, posT).xy);9 float2 coords = texCoord + (float2(1.0, 1.0) - tex2D(indirectTexture, subTexCoord).xy); 10 10 ocolor = float4(coords, 0.0, 1.0); 11 11 } -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/BBCBillboardCloud.cpp
r786 r821 62 62 63 63 unsigned int numGeneratedBillboardClouds = 0; 64 bool mergeBillboardCloudTexCoordGenerated = false; 65 64 66 for (unsigned int iBillboard = 0; iBillboard < getNumBillboards(); iBillboard++) 65 67 { … … 73 75 { 74 76 subEntity = mEntity->getSubEntity(0); 77 78 if (!mergeBillboardCloudTexCoordGenerated) 79 { 80 subEntity->enableVertexColours(true); 81 82 mergeBillboardCloudTexCoordGenerated = true; 83 } 84 75 85 unsigned int offset = subEntity->getNumFaces() * 3; 76 86 Ogre::Vector3 indicesA = Ogre::Vector3(offset, offset + 1, offset + 2); … … 90 100 Ogre::Vector3 indices = Ogre::Vector3(0,1,2); 91 101 subEntity = mEntity->getSubEntity(numGeneratedBillboardClouds); 92 subEntity->addTextureCoordSet(2); 93 94 Ogre::LogManager::getSingleton().logMessage("BBC-SubEntity(" + Ogre::StringConverter::toString(numGeneratedBillboardClouds) + ") - Num.Tex.Coord.Sets:" + Ogre::StringConverter::toString(subEntity->getNumTexCoordSets())); 102 103 subEntity->enableVertexColours(true); 104 105 //Ogre::LogManager::getSingleton().logMessage("BBC-SubEntity(" + Ogre::StringConverter::toString(numGeneratedBillboardClouds) + ") - Num.Tex.Coord.Sets:" + Ogre::StringConverter::toString(subEntity->getNumTexCoordSets())); 95 106 96 107 subEntity->addFaceVerticesIDs(indices); … … 101 112 // Face A of the billboard quad 102 113 vFaceA1.position = billboard->getBillboardClusterData()->getQuadTopLeftCorner(); 114 vFaceA2.position = billboard->getBillboardClusterData()->getQuadTopRightCorner(); 115 vFaceA3.position = billboard->getBillboardClusterData()->getQuadBottomRightCorner(); 116 103 117 vFaceA1.normal = billboard->getBillboardClusterData()->getNormal(); 104 vFaceA1.uv[0] = Ogre::Vector3(1.0 , 0.0, 0.0);105 vFaceA2.position = billboard->getBillboardClusterData()->getQuadTopRightCorner();106 118 vFaceA2.normal = billboard->getBillboardClusterData()->getNormal(); 107 vFaceA2.uv[0] = Ogre::Vector3(0.0, 0.0, 0.0);108 vFaceA3.position = billboard->getBillboardClusterData()->getQuadBottomRightCorner();109 119 vFaceA3.normal = billboard->getBillboardClusterData()->getNormal(); 110 vFaceA3.uv[0] = Ogre::Vector3(0.0 ,1.0 ,0.0); 120 121 vFaceA1.colour = Ogre::ColourValue(1.0 , 0.0, 0.0, 0.0).getAsARGB(); 122 vFaceA2.colour = Ogre::ColourValue(0.0, 0.0, 0.0, 0.0).getAsARGB(); 123 vFaceA3.colour = Ogre::ColourValue(0.0, 1.0 ,0.0, 0.0).getAsARGB(); 111 124 112 125 // Face B of the billboard quad 113 126 UniqueVertex vFaceB1,vFaceB2,vFaceB3; 114 127 vFaceB1.position = billboard->getBillboardClusterData()->getQuadBottomRightCorner(); 128 vFaceB2.position = billboard->getBillboardClusterData()->getQuadBottomLeftCorner(); 129 vFaceB3.position = billboard->getBillboardClusterData()->getQuadTopLeftCorner(); 130 115 131 vFaceB1.normal = billboard->getBillboardClusterData()->getNormal(); 116 vFaceB1.uv[0] = Ogre::Vector3(0.0, 1.0 ,0.0);117 vFaceB2.position = billboard->getBillboardClusterData()->getQuadBottomLeftCorner();118 132 vFaceB2.normal = billboard->getBillboardClusterData()->getNormal(); 119 vFaceB2.uv[0] = Ogre::Vector3(1.0, 1.0, 0.0);120 vFaceB3.position = billboard->getBillboardClusterData()->getQuadTopLeftCorner();121 133 vFaceB3.normal = billboard->getBillboardClusterData()->getNormal(); 122 vFaceB3.uv[0] = Ogre::Vector3(1.0, 0.0, 0.0); 134 135 vFaceB1.colour = Ogre::ColourValue(0.0, 1.0 ,0.0, 0.0).getAsARGB(); 136 vFaceB2.colour = Ogre::ColourValue(1.0, 1.0, 0.0, 0.0).getAsARGB(); 137 vFaceB3.colour = Ogre::ColourValue(1.0, 0.0, 0.0, 0.0).getAsARGB(); 123 138 124 139 subEntity->addUniqueVertex(vFaceA1); … … 231 246 BillboardGroupPtr billboardGroup = this->getBillboardGroup(iBillboardGroup); 232 247 233 Ogre::LogManager::getSingleton().logMessage("BBCG-Num.Billboards:" + Ogre::StringConverter::toString(billboardGroup->getNumBillboards()));248 //Ogre::LogManager::getSingleton().logMessage("BBCG-Num.Billboards:" + Ogre::StringConverter::toString(billboardGroup->getNumBillboards())); 234 249 235 250 for (unsigned int iBillboard = 0; iBillboard < billboardGroup->getNumBillboards(); iBillboard++) … … 252 267 subEntityGroup->addTextureCoordSet(subEntity->getTexCoordDimensions(subEntityGroup->getNumTexCoordSets())); 253 268 } 269 270 subEntityGroup->enableVertexColours(subEntity->hasVertexColours()); 254 271 255 272 unsigned int offset = subEntityGroup->getNumFaces() * 3; … … 261 278 262 279 UniqueVertex vFaceA1,vFaceA2,vFaceA3; 280 263 281 // Face A of the billboard quad 264 282 vFaceA1.position = billboard->getBillboardClusterData()->getQuadTopLeftCorner(); 283 vFaceA2.position = billboard->getBillboardClusterData()->getQuadTopRightCorner(); 284 vFaceA3.position = billboard->getBillboardClusterData()->getQuadBottomRightCorner(); 285 265 286 vFaceA1.normal = billboard->getBillboardClusterData()->getNormal(); 266 267 vFaceA2.position = billboard->getBillboardClusterData()->getQuadTopRightCorner();268 287 vFaceA2.normal = billboard->getBillboardClusterData()->getNormal(); 288 vFaceA3.normal = billboard->getBillboardClusterData()->getNormal(); 289 290 if (subEntity->hasVertexColours()) 291 { 292 vFaceA1.colour = subEntity->getVertexColour(0); 293 vFaceA2.colour = subEntity->getVertexColour(1); 294 vFaceA3.colour = subEntity->getVertexColour(2); 295 } 269 296 270 vFaceA3.position = billboard->getBillboardClusterData()->getQuadBottomRightCorner(); 271 vFaceA3.normal = billboard->getBillboardClusterData()->getNormal(); 272 297 UniqueVertex vFaceB1,vFaceB2,vFaceB3; 298 273 299 // Face B of the billboard quad 274 UniqueVertex vFaceB1,vFaceB2,vFaceB3;275 300 vFaceB1.position = billboard->getBillboardClusterData()->getQuadBottomRightCorner(); 301 vFaceB2.position = billboard->getBillboardClusterData()->getQuadBottomLeftCorner(); 302 vFaceB3.position = billboard->getBillboardClusterData()->getQuadTopLeftCorner(); 303 276 304 vFaceB1.normal = billboard->getBillboardClusterData()->getNormal(); 277 278 vFaceB2.position = billboard->getBillboardClusterData()->getQuadBottomLeftCorner();279 305 vFaceB2.normal = billboard->getBillboardClusterData()->getNormal(); 280 281 vFaceB3.position = billboard->getBillboardClusterData()->getQuadTopLeftCorner();282 306 vFaceB3.normal = billboard->getBillboardClusterData()->getNormal(); 283 307 284 Ogre::LogManager::getSingleton().logMessage("BBCG-SubEntity(" + Ogre::StringConverter::toString(numGeneratedBillboardClouds) + ") - Num.Tex.Coord.Sets:"+ Ogre::StringConverter::toString(subEntity->getNumTexCoordSets())); 308 if (subEntity->hasVertexColours()) 309 { 310 vFaceB1.colour = subEntity->getVertexColour(3); 311 vFaceB2.colour = subEntity->getVertexColour(4); 312 vFaceB3.colour = subEntity->getVertexColour(5); 313 } 314 315 //Ogre::LogManager::getSingleton().logMessage("BBCG-SubEntity(" + Ogre::StringConverter::toString(numGeneratedBillboardClouds) + ") - Num.Tex.Coord.Sets:"+ Ogre::StringConverter::toString(subEntity->getNumTexCoordSets())); 285 316 286 317 for (unsigned int iTexCoordSet = 0; iTexCoordSet < subEntityGroup->getNumTexCoordSets(); iTexCoordSet++) … … 308 339 309 340 mEntity = entity; 310 entity->setSubEntitiesDistinctVertexColours();311 341 } 312 342 -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/BBCBillboardCloudUVMapper.cpp
r778 r821 196 196 subEntity->setTexCoord(iUniqueVertex+2, subEntity->getNumTexCoordSets()-1, Ogre::Vector3(texCoords03[0],texCoords03[1],0)); 197 197 198 Ogre::ColourValue subEntityColour01 = Ogre::ColourValue(0, texCoords01[0],texCoords01[1]);199 Ogre::ColourValue subEntityColour02 = Ogre::ColourValue(0, texCoords02[0],texCoords02[1]);200 Ogre::ColourValue subEntityColour03 = Ogre::ColourValue(0, texCoords03[0],texCoords03[1]);201 202 subEntity->setVertexColour(iUniqueVertex, subEntityColour01.getAsRGBA());203 subEntity->setVertexColour(iUniqueVertex+1, subEntityColour02.getAsRGBA());204 subEntity->setVertexColour(iUniqueVertex+2, subEntityColour03.getAsRGBA());198 //Ogre::ColourValue subEntityColour01 = Ogre::ColourValue(0, texCoords01[0],texCoords01[1]); 199 //Ogre::ColourValue subEntityColour02 = Ogre::ColourValue(0, texCoords02[0],texCoords02[1]); 200 //Ogre::ColourValue subEntityColour03 = Ogre::ColourValue(0, texCoords03[0],texCoords03[1]); 201 202 //subEntity->setVertexColour(iUniqueVertex, subEntityColour01.getAsRGBA()); 203 //subEntity->setVertexColour(iUniqueVertex+1, subEntityColour02.getAsRGBA()); 204 //subEntity->setVertexColour(iUniqueVertex+2, subEntityColour03.getAsRGBA()); 205 205 206 206 // Face B … … 212 212 subEntity->setTexCoord(iUniqueVertex+5, subEntity->getNumTexCoordSets()-1, Ogre::Vector3(texCoords01[0],texCoords01[1],0)); 213 213 214 Ogre::ColourValue subEntityColour04 = Ogre::ColourValue(0, texCoords03[0],texCoords03[1]);215 Ogre::ColourValue subEntityColour05 = Ogre::ColourValue(0, texCoords04[0],texCoords04[1]);216 Ogre::ColourValue subEntityColour06 = Ogre::ColourValue(0, texCoords01[0],texCoords01[1]);217 218 subEntity->setVertexColour(iUniqueVertex+3, subEntityColour04.getAsRGBA());219 subEntity->setVertexColour(iUniqueVertex+4, subEntityColour05.getAsRGBA());220 subEntity->setVertexColour(iUniqueVertex+5, subEntityColour06.getAsRGBA());214 //Ogre::ColourValue subEntityColour04 = Ogre::ColourValue(0, texCoords03[0],texCoords03[1]); 215 //Ogre::ColourValue subEntityColour05 = Ogre::ColourValue(0, texCoords04[0],texCoords04[1]); 216 //Ogre::ColourValue subEntityColour06 = Ogre::ColourValue(0, texCoords01[0],texCoords01[1]); 217 218 //subEntity->setVertexColour(iUniqueVertex+3, subEntityColour04.getAsRGBA()); 219 //subEntity->setVertexColour(iUniqueVertex+4, subEntityColour05.getAsRGBA()); 220 //subEntity->setVertexColour(iUniqueVertex+5, subEntityColour06.getAsRGBA()); 221 221 } 222 222 else … … 238 238 subEntity->setTexCoord(iUniqueVertex+2, subEntity->getNumTexCoordSets()-1, Ogre::Vector3(texCoords03[0],texCoords03[1],0)); 239 239 240 Ogre::ColourValue subEntityColour01 = Ogre::ColourValue(0, texCoords01[0],texCoords01[1]);241 Ogre::ColourValue subEntityColour02 = Ogre::ColourValue(0, texCoords02[0],texCoords02[1]);242 Ogre::ColourValue subEntityColour03 = Ogre::ColourValue(0, texCoords03[0],texCoords03[1]);243 244 subEntity->setVertexColour(iUniqueVertex, subEntityColour01.getAsRGBA());245 subEntity->setVertexColour(iUniqueVertex+1, subEntityColour02.getAsRGBA());246 subEntity->setVertexColour(iUniqueVertex+2, subEntityColour03.getAsRGBA());240 //Ogre::ColourValue subEntityColour01 = Ogre::ColourValue(0, texCoords01[0],texCoords01[1]); 241 //Ogre::ColourValue subEntityColour02 = Ogre::ColourValue(0, texCoords02[0],texCoords02[1]); 242 //Ogre::ColourValue subEntityColour03 = Ogre::ColourValue(0, texCoords03[0],texCoords03[1]); 243 244 //subEntity->setVertexColour(iUniqueVertex, subEntityColour01.getAsRGBA()); 245 //subEntity->setVertexColour(iUniqueVertex+1, subEntityColour02.getAsRGBA()); 246 //subEntity->setVertexColour(iUniqueVertex+2, subEntityColour03.getAsRGBA()); 247 247 248 248 // Face B … … 254 254 subEntity->setTexCoord(iUniqueVertex+5, subEntity->getNumTexCoordSets()-1, Ogre::Vector3(texCoords01[0],texCoords01[1],0)); 255 255 256 Ogre::ColourValue subEntityColour04 = Ogre::ColourValue(0, texCoords03[0],texCoords03[1]);257 Ogre::ColourValue subEntityColour05 = Ogre::ColourValue(0, texCoords04[0],texCoords04[1]);258 Ogre::ColourValue subEntityColour06 = Ogre::ColourValue(0, texCoords01[0],texCoords01[1]);259 260 subEntity->setVertexColour(iUniqueVertex+3, subEntityColour04.getAsRGBA());261 subEntity->setVertexColour(iUniqueVertex+4, subEntityColour05.getAsRGBA());262 subEntity->setVertexColour(iUniqueVertex+5, subEntityColour06.getAsRGBA());256 //Ogre::ColourValue subEntityColour04 = Ogre::ColourValue(0, texCoords03[0],texCoords03[1]); 257 //Ogre::ColourValue subEntityColour05 = Ogre::ColourValue(0, texCoords04[0],texCoords04[1]); 258 //Ogre::ColourValue subEntityColour06 = Ogre::ColourValue(0, texCoords01[0],texCoords01[1]); 259 260 //subEntity->setVertexColour(iUniqueVertex+3, subEntityColour04.getAsRGBA()); 261 //subEntity->setVertexColour(iUniqueVertex+4, subEntityColour05.getAsRGBA()); 262 //subEntity->setVertexColour(iUniqueVertex+5, subEntityColour06.getAsRGBA()); 263 263 264 264 } … … 341 341 for (unsigned int iBillboard = 0; iBillboard < mBillboardCloud->getNumBillboards(); iBillboard++) 342 342 { 343 Ogre::LogManager::getSingleton().logMessage("id:" + Ogre::StringConverter::toString(mBillboardCloud->getBillboard(iBillboard)->getBillboardHandle()));343 //Ogre::LogManager::getSingleton().logMessage("id:" + Ogre::StringConverter::toString(mBillboardCloud->getBillboard(iBillboard)->getBillboardHandle())); 344 344 345 345 BillboardClusterData *billboardClusterData = mBillboardCloud->getBillboard(iBillboard)->getBillboardClusterData().get(); -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IMGNodeBsp.cpp
r731 r821 109 109 float width, height; 110 110 111 bound.print(); 111 //bound.print(); 112 112 113 min = bound.getMinimum(); 113 114 max = bound.getMaximum(); -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCBillboardCloudDiffuseColorTextureViewMode.cpp
r778 r821 255 255 bool BillboardCloudDiffuseColorTextureViewMode::frameStarted(const Ogre::FrameEvent& evt, Ogre::InputReader *inputReader) 256 256 { 257 showDebugOverlay(false); 257 258 initializeEntityClustersGrouped(); 258 259 initializeBillboardCloudSplitted(); -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCBillboardCloudIndirectTextureViewMode.cpp
r778 r821 257 257 bool BillboardCloudIndirectTextureViewMode::frameStarted(const Ogre::FrameEvent& evt, Ogre::InputReader *inputReader) 258 258 { 259 showDebugOverlay(false); 259 260 initializeEntityClustersGrouped(); 260 261 initializeBillboardCloudSplitted(); -
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/OBAOgreFrameListener.cpp
r778 r821 90 90 } 91 91 92 mWindow->setDebugText("P: " + mDefaultOgreFrameListenerMode->getSceneManager()->getName() + " -- " + Ogre::StringConverter::toString(mTimeUntilNextToggle));92 //mWindow->setDebugText("P: " + mDefaultOgreFrameListenerMode->getSceneManager()->getName() + " -- " + Ogre::StringConverter::toString(mTimeUntilNextToggle)); 93 93 94 94 return mDefaultOgreFrameListenerMode->frameStarted(evt,mInputDevice);
Note: See TracChangeset
for help on using the changeset viewer.