love.graphics internal Buffer objects are no longer OpenGL-specific.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-01-28 19:26:57 -04:00
parent 470098b7e6
commit d990044288
27 changed files with 594 additions and 532 deletions
+17
View File
@@ -31,6 +31,11 @@
#include <vector>
#include <stddef.h>
namespace glslang
{
class TShader;
}
namespace love
{
namespace graphics
@@ -171,6 +176,8 @@ public:
**/
virtual void setVideoTextures(ptrdiff_t ytexture, ptrdiff_t cbtexture, ptrdiff_t crtexture) = 0;
virtual ptrdiff_t getHandle() const = 0;
static bool validate(Graphics *gfx, bool gles, const ShaderSource &source, bool checkWithDefaults, std::string &err);
static bool initialize();
@@ -187,9 +194,19 @@ public:
protected:
struct CachedShaderStage
{
int referenceCount;
ShaderStage stage;
glslang::TShader *glslangShader;
ptrdiff_t handle;
};
// Source code used for this Shader.
ShaderSource shaderSource;
static std::map<std::string, CachedShaderStage> cachedShaders;
private:
static StringMap<Language, LANGUAGE_MAX_ENUM>::Entry languageEntries[];