mirror of
https://github.com/love2d/love.git
synced 2026-08-19 04:06:17 +02:00
Removed code for tesselation and geometry shader detection
This commit is contained in:
@@ -89,7 +89,7 @@ Shader::~Shader()
|
|||||||
unloadVolatile();
|
unloadVolatile();
|
||||||
}
|
}
|
||||||
|
|
||||||
GLuint Shader::compileShaderCode(ShaderType type, const std::string &code)
|
GLuint Shader::compileCode(ShaderType type, const std::string &code)
|
||||||
{
|
{
|
||||||
GLenum glshadertype;
|
GLenum glshadertype;
|
||||||
const char *shadertypename = NULL;
|
const char *shadertypename = NULL;
|
||||||
@@ -100,18 +100,6 @@ GLuint Shader::compileShaderCode(ShaderType type, const std::string &code)
|
|||||||
glshadertype = GL_VERTEX_SHADER;
|
glshadertype = GL_VERTEX_SHADER;
|
||||||
shadertypename = "vertex";
|
shadertypename = "vertex";
|
||||||
break;
|
break;
|
||||||
case TYPE_TESSCONTROL:
|
|
||||||
glshadertype = GL_TESS_CONTROL_SHADER;
|
|
||||||
shadertypename = "tesselation control";
|
|
||||||
break;
|
|
||||||
case TYPE_TESSEVAL:
|
|
||||||
glshadertype = GL_TESS_EVALUATION_SHADER;
|
|
||||||
shadertypename = "tesselation evaluation";
|
|
||||||
break;
|
|
||||||
case TYPE_GEOMETRY:
|
|
||||||
glshadertype = GL_GEOMETRY_SHADER;
|
|
||||||
shadertypename = "geometry";
|
|
||||||
break;
|
|
||||||
case TYPE_FRAGMENT:
|
case TYPE_FRAGMENT:
|
||||||
glshadertype = GL_FRAGMENT_SHADER;
|
glshadertype = GL_FRAGMENT_SHADER;
|
||||||
shadertypename = "fragment";
|
shadertypename = "fragment";
|
||||||
@@ -202,7 +190,7 @@ bool Shader::loadVolatile()
|
|||||||
ShaderSources::const_iterator source;
|
ShaderSources::const_iterator source;
|
||||||
for (source = _shadersources.begin(); source != _shadersources.end(); ++source)
|
for (source = _shadersources.begin(); source != _shadersources.end(); ++source)
|
||||||
{
|
{
|
||||||
GLuint shaderid = compileShaderCode(source->first, source->second);
|
GLuint shaderid = compileCode(source->first, source->second);
|
||||||
shaderids.push_back(shaderid);
|
shaderids.push_back(shaderid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,14 +42,10 @@ public:
|
|||||||
|
|
||||||
// pointer to currently active Shader.
|
// pointer to currently active Shader.
|
||||||
static Shader *current;
|
static Shader *current;
|
||||||
|
|
||||||
// Only vertex and fragment shaders have guaranteed support in all Shaders.
|
|
||||||
enum ShaderType
|
enum ShaderType
|
||||||
{
|
{
|
||||||
TYPE_VERTEX,
|
TYPE_VERTEX,
|
||||||
TYPE_TESSCONTROL,
|
|
||||||
TYPE_TESSEVAL,
|
|
||||||
TYPE_GEOMETRY,
|
|
||||||
TYPE_FRAGMENT,
|
TYPE_FRAGMENT,
|
||||||
TYPE_MAX_ENUM
|
TYPE_MAX_ENUM
|
||||||
};
|
};
|
||||||
@@ -130,7 +126,7 @@ private:
|
|||||||
GLint getUniformLocation(const std::string &name);
|
GLint getUniformLocation(const std::string &name);
|
||||||
void checkSetUniformError();
|
void checkSetUniformError();
|
||||||
|
|
||||||
GLuint compileShaderCode(ShaderType type, const std::string &code);
|
GLuint compileCode(ShaderType type, const std::string &code);
|
||||||
void createProgram(const std::vector<GLuint> &shaderids);
|
void createProgram(const std::vector<GLuint> &shaderids);
|
||||||
|
|
||||||
int getTextureUnit(const std::string &name);
|
int getTextureUnit(const std::string &name);
|
||||||
|
|||||||
Reference in New Issue
Block a user