test shader effect

This commit is contained in:
Eduardo Bart
2011-12-07 17:54:28 -02:00
parent 1a3dcb215e
commit b5cf4ad2c4
10 changed files with 131 additions and 7 deletions

View File

@@ -21,6 +21,7 @@
*/
#include "shader.h"
#include <framework/core/resourcemanager.h>
Shader::Shader(Shader::ShaderType shaderType)
{
@@ -70,8 +71,7 @@ bool Shader::compileSourceCode(const std::string& sourceCode)
bool Shader::compileSourceFile(const std::string& sourceFile)
{
std::ifstream fin(sourceFile);
std::string sourceCode((std::istreambuf_iterator<char>(fin)), std::istreambuf_iterator<char>());
std::string sourceCode = g_resources.loadFile(sourceFile);
return compileSourceCode(sourceCode);
}