mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Remove some dead code.
--HG-- branch : minor
This commit is contained in:
@@ -756,28 +756,6 @@ void Shader::updateBuiltinUniforms(love::graphics::Graphics *gfx, int viewportW,
|
||||
glUniform4fv(location, 13, (const GLfloat *) &data);
|
||||
}
|
||||
|
||||
std::string Shader::getGLSLVersion()
|
||||
{
|
||||
const char *tmp = (const char *) glGetString(GL_SHADING_LANGUAGE_VERSION);
|
||||
|
||||
if (tmp == nullptr)
|
||||
return "0.0";
|
||||
|
||||
// the version string always begins with a version number of the format
|
||||
// major_number.minor_number
|
||||
// or
|
||||
// major_number.minor_number.release_number
|
||||
// we can keep release_number, since it does not affect the check below.
|
||||
std::string versionstring(tmp);
|
||||
size_t minorendpos = versionstring.find(' ');
|
||||
return versionstring.substr(0, minorendpos);
|
||||
}
|
||||
|
||||
bool Shader::isSupported()
|
||||
{
|
||||
return GLAD_ES_VERSION_2_0 || (getGLSLVersion() >= "1.2");
|
||||
}
|
||||
|
||||
int Shader::getUniformTypeComponents(GLenum type) const
|
||||
{
|
||||
if (getUniformBaseType(type) == UNIFORM_SAMPLER)
|
||||
|
||||
Reference in New Issue
Block a user