Backout changeset b3928e24add23da69dcd90c34985cd6a05454be0

This commit is contained in:
Alex Szpakowski
2014-05-03 22:07:32 -03:00
parent 4bc96f1bf6
commit 5428a5d75f
7 changed files with 78 additions and 158 deletions
+8 -6
View File
@@ -74,11 +74,14 @@ public:
UNIFORM_MAX_ENUM
};
// Type for a list of shader source codes in the form of sources[shadertype] = code
typedef std::map<ShaderType, std::string> ShaderSources;
/**
* Creates a new Shader using a list of source codes.
* The sources must contain either vertex or pixel shader code, or both.
* Sources must contain either vertex or pixel shader code, or both.
**/
Shader(const std::vector<std::string> &vertcode, const std::vector<std::string> &pixelcode);
Shader(const ShaderSources &sources);
virtual ~Shader();
@@ -193,7 +196,7 @@ private:
UniformType getUniformBaseType(GLenum type) const;
void checkSetUniformError(const Uniform &u, int size, int count, UniformType sendtype) const;
GLuint compileCode(ShaderType type, const std::vector<std::string> &code);
GLuint compileCode(ShaderType type, const std::string &code);
void createProgram(const std::vector<GLuint> &shaderids);
int getTextureUnit(const std::string &name);
@@ -203,9 +206,8 @@ private:
// Get any warnings or errors generated only by the shader program object.
std::string getProgramWarnings() const;
// List of all shader code attached to this Shader. Each shader type has its
// own list, which represents separate "files".
std::vector<std::string> shaderSources[TYPE_MAX_ENUM];
// List of all shader code attached to this Shader
ShaderSources shaderSources;
// Shader compiler warning strings for individual shader stages.
std::map<ShaderType, std::string> shaderWarnings;