Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 336 vs 337 for /trunk/Source Code/Platform/Video/Shaders/ShaderManager.cpp

Diff revisions: vs.
  @@ -22,7 +22,7 @@
22 22 void ShaderManager::destroy() {
23 23 RemoveResource(_imShader);
24 24 RemoveResource(_nullShader);
25 - GFX_DEVICE.deInitShaders();
25 + GFX_DEVICE.deInitShaders();
26 26 _atoms.clear();
27 27 }
28 28
  @@ -81,7 +81,7 @@
81 81 return false;
82 82 }
83 83 }
84 - return true;
84 + return true;
85 85 }
86 86
87 87 /// Calling this will force a recompilation of all shader stages for the program that matches the name specified
  @@ -119,14 +119,14 @@
119 119
120 120 /// Pass uniform data update call to every registered program
121 121 void ShaderManager::refreshShaderData() {
122 - for (ShaderProgramMap::value_type& it : _shaderPrograms) {
122 + for (ShaderProgramMap::value_type& it : _shaderPrograms) {
123 123 it.second->refreshShaderData();
124 124 }
125 125 }
126 126
127 127 /// Pass scene data update call to every registered program
128 128 void ShaderManager::refreshSceneData() {
129 - for (ShaderProgramMap::value_type& it : _shaderPrograms) {
129 + for (ShaderProgramMap::value_type& it : _shaderPrograms) {
130 130 it.second->refreshSceneData();
131 131 }
132 132 }
  @@ -140,32 +140,32 @@
140 140 return it->second;
141 141 }
142 142 // If we forgot to specify an atom location, we have nothing to return
143 - assert(!location.empty());
143 + assert(!location.empty());
144 144
145 145 // Open the atom file
146 146 stringImpl file = location+"/"+atomName;
147 147 FILE *fp = nullptr;
148 148 fopen_s(&fp,file.c_str(),"r");
149 - assert(fp != nullptr);
149 + assert(fp != nullptr);
150 150
151 151 // Read the contents
152 152 fseek(fp, 0, SEEK_END);
153 153 I32 count = ftell(fp);
154 154 rewind(fp);
155 - assert(count > 0);
155 + assert(count > 0);
156 156
157 157 char* content = MemoryManager_NEW char[count + 1];
158 158 count = (I32)(fread(content,sizeof(char),count,fp));
159 159 content[count] = '\0';
160 - fclose(fp);
160 + fclose(fp);
161 161
162 162 // Add the code to the atom cache for future reference
163 - hashAlg::pair<AtomMap::iterator, bool> result = hashAlg::emplace(_atoms, atomName, stringImpl(content));
164 - assert(result.second);
163 + hashAlg::pair<AtomMap::iterator, bool> result = hashAlg::emplace(_atoms, atomName, stringImpl(content));
164 + assert(result.second);
165 165 MemoryManager::DELETE_ARRAY( content );
166 166
167 167 // Return the source code
168 - return result.first->second;
168 + return result.first->second;
169 169 }
170 170
171 171 /// Dump the source code 's' of atom file 'atomName' to file