Restructured some Shader code. Added runtime temporary caching and sharing of shader stages. Resolves issue #1235.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-10-21 03:08:18 -03:00
parent f4e515edac
commit e5b0d96b27
16 changed files with 683 additions and 371 deletions
+1 -7
View File
@@ -47,8 +47,7 @@ public:
* Creates a new Shader using a list of source codes.
* Source must contain either vertex or pixel shader code, or both.
**/
Shader(const ShaderSource &source);
Shader(love::graphics::ShaderStage *vertex, love::graphics::ShaderStage *pixel);
virtual ~Shader();
// Implements Volatile
@@ -96,16 +95,11 @@ private:
TextureType getUniformTextureType(GLenum type) const;
bool isDepthTextureType(GLenum type) const;
GLuint compileCode(ShaderStage stage, const std::string &code);
void flushStreamDraws() const;
// Get any warnings or errors generated only by the shader program object.
std::string getProgramWarnings() const;
// Shader compiler warning strings for individual shader stages.
std::map<ShaderStage, std::string> shaderWarnings;
// volatile
GLuint program;