Changeset 2362 for OGRE


Ignore:
Timestamp:
05/10/07 08:51:31 (17 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • OGRE/trunk/ogre_changes/Ogre1.2/RenderSystems/Direct3D9/src/OgreD3D9HLSLProgram.cpp

    r2356 r2362  
    108108    void D3D9HLSLProgram::loadFromFile(void) 
    109109        { 
     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                /* 
    110141                 LPD3DXBUFFER errors = 0; 
    111142                 
     
    143174            OGRE_EXCEPT(hr, message, 
    144175                "D3D9HLSLProgram::loadFromSource"); 
    145         } 
     176        }*/ 
    146177        } 
    147178#endif 
Note: See TracChangeset for help on using the changeset viewer.