Renamed all cases of "fragment shader" to "pixel shader"

This commit is contained in:
Alex Szpakowski
2013-03-17 18:11:41 -03:00
parent 73c9f412ea
commit 07ba81f060
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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.");
+2 -2
View File
@@ -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())