mirror of
https://github.com/love2d/love.git
synced 2026-08-19 20:19:42 +02:00
Renamed all cases of "fragment shader" to "pixel shader"
This commit is contained in:
@@ -102,9 +102,9 @@ GLuint Shader::compileCode(ShaderType type, const std::string &code)
|
|||||||
glshadertype = GL_VERTEX_SHADER;
|
glshadertype = GL_VERTEX_SHADER;
|
||||||
shadertypename = "vertex";
|
shadertypename = "vertex";
|
||||||
break;
|
break;
|
||||||
case TYPE_FRAGMENT:
|
case TYPE_PIXEL:
|
||||||
glshadertype = GL_FRAGMENT_SHADER;
|
glshadertype = GL_FRAGMENT_SHADER;
|
||||||
shadertypename = "fragment";
|
shadertypename = "pixel";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw love::Exception("Cannot create shader object: unknown shader type.");
|
throw love::Exception("Cannot create shader object: unknown shader type.");
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public:
|
|||||||
enum ShaderType
|
enum ShaderType
|
||||||
{
|
{
|
||||||
TYPE_VERTEX,
|
TYPE_VERTEX,
|
||||||
TYPE_FRAGMENT,
|
TYPE_PIXEL,
|
||||||
TYPE_MAX_ENUM
|
TYPE_MAX_ENUM
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new Shader using a list of source codes.
|
* Creates a new Shader using a list of source codes.
|
||||||
* Sources must contain either vertex or fragment shader code, or both.
|
* Sources must contain either vertex or pixel shader code, or both.
|
||||||
**/
|
**/
|
||||||
Shader(const ShaderSources &sources);
|
Shader(const ShaderSources &sources);
|
||||||
|
|
||||||
|
|||||||
@@ -526,11 +526,11 @@ int w_newShader(lua_State *L)
|
|||||||
sources[Shader::TYPE_VERTEX] = vertcode;
|
sources[Shader::TYPE_VERTEX] = vertcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fragment shader code
|
// pixel shader code
|
||||||
if (lua_isstring(L, -1))
|
if (lua_isstring(L, -1))
|
||||||
{
|
{
|
||||||
std::string fragcode(luaL_checkstring(L, -1));
|
std::string fragcode(luaL_checkstring(L, -1));
|
||||||
sources[Shader::TYPE_FRAGMENT] = fragcode;
|
sources[Shader::TYPE_PIXEL] = fragcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sources.empty())
|
if (sources.empty())
|
||||||
|
|||||||
Reference in New Issue
Block a user