Changeset 3220
- Timestamp:
- 12/10/08 15:57:06 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/IrradianceMapping.vcproj
r3037 r3220 41 41 Name="VCCLCompilerTool" 42 42 Optimization="0" 43 AdditionalIncludeDirectories="libs;src;libs/GL;libs/Devil/include;libs/Zlib/include;"$(CG_INC_PATH)"" 43 44 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" 44 45 MinimalRebuild="true" … … 61 62 <Tool 62 63 Name="VCLinkerTool" 64 AdditionalDependencies="DemoEngine.lib glut32.lib glew32s.lib glew32.lib DevIL.lib ILUT.lib zlib.lib cg.lib cgGL.lib" 63 65 LinkIncremental="2" 66 AdditionalLibraryDirectories=""lib/$(ConfigurationName)";libs;"$(CG_LIB_PATH)";libs/GL;libs/Devil/lib;libs/Zlib/lib" 67 IgnoreDefaultLibraryNames="LIBCMT" 64 68 GenerateDebugInformation="true" 65 69 SubSystem="1" … … 121 125 OmitFramePointers="true" 122 126 EnableFiberSafeOptimizations="true" 123 AdditionalIncludeDirectories="libs; libs/GL;libs/Devil/include;src;libs/Zlib/include;"$(CG_INC_PATH)""127 AdditionalIncludeDirectories="libs;src;libs/GL;libs/Devil/include;libs/Zlib/include;"$(CG_INC_PATH)"" 124 128 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE; _CRT_SECURE_NO_WARNINGS" 125 129 RuntimeLibrary="2" -
GTP/trunk/App/Demos/Vis/FriendlyCulling/VboFormatConverter.vcproj
r3107 r3220 18 18 <Configuration 19 19 Name="Debug|Win32" 20 OutputDirectory="$(SolutionDir)$ (ConfigurationName)"21 IntermediateDirectory="$(ConfigurationName) "20 OutputDirectory="$(SolutionDir)$\VboFormatConverter\(ConfigurationName)" 21 IntermediateDirectory="$(ConfigurationName)\VboFormatConverter" 22 22 ConfigurationType="1" 23 23 CharacterSet="1" -
GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env
r3217 r3220 3 3 ##################################################### 4 4 5 6 ################ 7 # misc stuff 8 9 useLODs=1 10 shadowSize=4096 11 # the filenames given to recorded frames (+ number.bmp) 12 recordedFramesSuffix=image 5 13 6 14 … … 15 23 maxDepthForTestingChildren=3 16 24 17 ################18 19 useLODs=120 shadowSize=409621 25 22 26 #################### -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3219 r3220 333 333 mSampleIntensity(0.2f), 334 334 mSunVisiblePixels(0), 335 mSavedFrameNumber(-1) 335 mSavedFrameNumber(-1), 336 mSavedFrameSuffix("") 336 337 { 337 338 /////////// … … 1326 1327 1327 1328 static char imageName[200]; 1328 sprintf(imageName, " myframe%05d.bmp", mSavedFrameNumber);1329 sprintf(imageName, "%s_%05d.bmp", mSavedFrameSuffix.c_str(), mSavedFrameNumber); 1329 1330 1330 1331 ILstring fileName = ILstring(imageName); … … 1422 1423 1423 1424 1424 void DeferredRenderer::SetSaveFrame(int frameNumber) 1425 { 1425 void DeferredRenderer::SetSaveFrame(const string &suffix, int frameNumber) 1426 { 1427 mSavedFrameSuffix = suffix; 1426 1428 mSavedFrameNumber = frameNumber; 1427 1429 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.h
r3219 r3220 86 86 using the specified frame number 87 87 */ 88 void SetSaveFrame( int frameNumber);88 void SetSaveFrame(const std::string &suffix, int frameNumber); 89 89 90 90 … … 202 202 203 203 int mSavedFrameNumber; 204 std::string mSavedFrameSuffix; 204 205 }; 205 206 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Environment.cpp
r2829 r3220 69 69 70 70 71 bool Environment::GetStringParam(std::string &str, string &val) const 72 { 73 map<string, string>::const_iterator it = mParams.find(str); 74 75 if (it == mParams.end()) // parameter not found 76 return false; 77 78 // just assign value as it is - the line break character 79 val = (*it).second; 80 val.erase(val.end() - 1); 81 82 return true; 83 } 84 85 71 86 bool Environment::Read(const string &filename) 72 87 { -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Environment.h
r2828 r3220 16 16 17 17 /** Loads startup environment for the demo 18 Options are stored as name / value pair 18 19 */ 19 20 class Environment … … 25 26 bool Read(const std::string &filename); 26 27 27 bool GetFloatParam(std::string &str, float &val) const; 28 bool GetIntParam(std::string &str, int &val) const; 29 bool GetVectorParam(std::string &str, Vector3 &val) const; 30 bool GetBoolParam(std::string &str, bool &val) const; 28 bool GetFloatParam(std::string &name, float &val) const; 29 bool GetIntParam(std::string &name, int &val) const; 30 bool GetVectorParam(std::string &name, Vector3 &val) const; 31 bool GetBoolParam(std::string &name, bool &val) const; 32 bool GetStringParam(std::string &name, std::string &val) const; 33 31 34 32 35 protected: -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/WalkThroughRecorder.cpp
r3219 r3220 17 17 18 18 19 WalkThroughRecorder::~WalkThroughRecorder() 20 { 21 mFile.close(); 22 } 23 24 19 25 void WalkThroughRecorder::WriteFrame(Camera *cam) 20 26 { … … 28 34 { 29 35 ifstream file(filename.c_str()); 30 FrameInfo info;31 int i=0;32 36 33 std::string token; 37 if (file.is_open()) 38 { 39 FrameInfo info; 40 int i=0; 34 41 35 while(std::getline(file, token)) 42 std::string token; 43 44 while(std::getline(file, token)) 45 { 46 std::stringstream line(token); 47 48 line >> info; 49 mFrameInfos.push_back(info); 50 } 51 } 52 else 36 53 { 37 std::stringstream line(token); 54 cerr << "problem: cannot open file " << filename << endl; 55 } 38 56 39 line >> info; 40 mFrameInfos.push_back(info); 41 } 57 file.close(); 42 58 } 43 59 … … 45 61 bool WalkThroughPlayer::ReadNextFrame(Camera *cam) 46 62 { 63 if (mFrameInfos.empty()) 64 return false; 65 47 66 cam->SetDirection(mFrameInfos[mFrame].mDirection); 48 67 cam->SetPosition(mFrameInfos[mFrame].mPosition); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/WalkThroughRecorder.h
r3219 r3220 31 31 32 32 33 // Overload << operator for C++-style output33 /// Overload << operator for C++-style output 34 34 inline std::ostream& operator<< (std::ostream &s, const FrameInfo &A) 35 35 { … … 38 38 39 39 40 // Overload >> operator for C++-style input40 /// Overload >> operator for C++-style input 41 41 inline std::istream& operator>> (std::istream &s, FrameInfo &A) 42 42 { 43 43 return s >> A.mPosition >> A.mDirection; 44 44 } 45 46 45 47 46 … … 54 53 */ 55 54 WalkThroughRecorder(const std::string &filename); 55 56 ~WalkThroughRecorder(); 57 56 58 /** Writes current camera data. 57 59 */ 58 60 void WriteFrame(Camera *cam); 59 61 62 60 63 protected: 61 64 62 65 std::ofstream mFile; 63 66 }; 67 64 68 65 69 /** Replays a given walkthrough -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3219 r3220 122 122 int currentReplayFrame = -1; 123 123 124 string recordedFramesSuffix("frames"); 125 124 126 /// the walkThroughRecorder 125 127 WalkThroughRecorder *walkThroughRecorder = NULL; … … 416 418 env.GetFloatParam(string("ssaoKernelRadius"), ssaoKernelRadius); 417 419 env.GetFloatParam(string("ssaoSampleIntensity"), ssaoSampleIntensity); 418 419 420 env.GetBoolParam(string("ssaoUseFullResolution"), ssaoUseFullResolution); 421 422 env.GetStringParam(string("recordedFramesSuffix"), recordedFramesSuffix); 420 423 421 424 //env.GetStringParam(string("modelPath"), model_path); … … 446 449 cout << "kernel radius: " << ssaoKernelRadius << endl; 447 450 cout << "ssao full resolution: " << ssaoUseFullResolution << endl; 451 cout << "recorded frames suffix: " << recordedFramesSuffix << endl; 448 452 449 453 //cout << "model path: " << model_path << endl; … … 511 515 resourceManager = ResourceManager::GetSingleton(); 512 516 shaderManager = ShaderManager::GetSingleton(); 517 513 518 514 519 /////////// … … 1261 1266 deferredShader->SetUseTemporalCoherence(useTemporalCoherence); 1262 1267 deferredShader->SetSortSamples(sortSamples); 1263 deferredShader->SetSaveFrame( (recordFrames && replayPath) ? -1 : currentReplayFrame);1268 deferredShader->SetSaveFrame(recordedFramesSuffix, (recordFrames && replayPath) ? currentReplayFrame : -1); 1264 1269 1265 1270 ShadowMap *sm = showShadowMap ? shadowMap : NULL; … … 1490 1495 case 'u': 1491 1496 case 'U': 1497 // move light source instead of camera tilt 1492 1498 moveLight = !moveLight; 1493 1499 break;
Note: See TracChangeset
for help on using the changeset viewer.