Changeset 2362 for OGRE/trunk
- Timestamp:
- 05/10/07 08:51:31 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OGRE/trunk/ogre_changes/Ogre1.2/RenderSystems/Direct3D9/src/OgreD3D9HLSLProgram.cpp
r2356 r2362 108 108 void D3D9HLSLProgram::loadFromFile(void) 109 109 { 110 DataStreamPtr stream = 111 ResourceGroupManager::getSingleton().openResource( 112 mFilename, mGroup, true, this); 113 114 mSource = ""; 115 116 while(!stream->eof()) 117 { 118 String line = stream->getLine(); 119 if(line.find("#include")!= line.npos) 120 { 121 int firstocc = line.find("\"",0); 122 int secondocc = line.find("\"",firstocc+1); 123 String filename = line.substr(firstocc+1,secondocc - firstocc - 1); 124 125 DataStreamPtr includedstream = ResourceGroupManager::getSingleton().openResource( 126 filename, mGroup, true, 0); 127 while(!includedstream->eof()) 128 { 129 line = includedstream->getLine(); 130 mSource.append(line); 131 } 132 } 133 else 134 mSource.append(line); 135 mSource.append("\n"); 136 } 137 // mSource.append(0); 138 // mSource = stream->getAsString(); 139 loadFromSource(); 140 /* 110 141 LPD3DXBUFFER errors = 0; 111 142 … … 143 174 OGRE_EXCEPT(hr, message, 144 175 "D3D9HLSLProgram::loadFromSource"); 145 } 176 }*/ 146 177 } 147 178 #endif
Note: See TracChangeset
for help on using the changeset viewer.