Commit a40cf07a authored by Christopher Tenter's avatar Christopher Tenter

minor fix in shader gen

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@19855 383ad7c9-94d9-4d36-a494-682f7c89f535
parent af59d28c
......@@ -464,7 +464,7 @@ GLSL::Program* ACG::ShaderCache::getComputeProgram(const char* _computeShaderFil
// If the shaders are equal, we return the cached entry
if (!compareShaderGenDescs(&it->first, &newEntry))
{
if ( ( timeCheck_ && !compareTimeStamp(&it->first, &newEntry)) || !it->second)
if ( ( timeCheck_ && !compareTimeStamp(&it->first, &newEntry)) || !it->second || !it->second->isLinked())
oldCache = it;
else
return it->second;
......@@ -521,7 +521,7 @@ GLSL::Program* ACG::ShaderCache::getComputeProgram(const char* _computeShaderFil
if (dumpStream.is_open())
{
for (GLSL::StringList::iterator it = shaderSrc.begin(); it != shaderSrc.end(); ++it)
dumpStream << *it;
dumpStream << it->c_str();
dumpStream.close();
}
}
......
......@@ -441,7 +441,13 @@ void ShaderGenerator::addStringToList(QString _str,
QString _postfix)
{
// Construct the whole string
QString tmp = _prefix + _str + _postfix;
QString tmp = _str;
if (!_str.startsWith(_prefix))
tmp = _prefix + tmp;
if (!_str.endsWith(_postfix))
tmp += _postfix;
// normalize string
// remove tabs, double whitespace
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment