parent
cc4087f3fe
commit
8597cd2c2e
@ -112,15 +112,6 @@ bool CShaderManager::NewProgram(const char* name, const CShaderDefines& baseDefi
|
|||||||
PROFILE2("loading shader");
|
PROFILE2("loading shader");
|
||||||
PROFILE2_ATTR("name: %s", name);
|
PROFILE2_ATTR("name: %s", name);
|
||||||
|
|
||||||
if (strncmp(name, "fixed:", 6) == 0)
|
|
||||||
{
|
|
||||||
program = CShaderProgramPtr(CShaderProgram::ConstructFFP(name+6, baseDefines));
|
|
||||||
if (!program)
|
|
||||||
return false;
|
|
||||||
program->Reload();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
VfsPath xmlFilename = L"shaders/" + wstring_from_utf8(name) + L".xml";
|
VfsPath xmlFilename = L"shaders/" + wstring_from_utf8(name) + L".xml";
|
||||||
|
|
||||||
CXeromyces XeroFile;
|
CXeromyces XeroFile;
|
||||||
@ -456,14 +447,7 @@ bool CShaderManager::NewEffect(const char* name, const CShaderDefines& baseDefin
|
|||||||
|
|
||||||
if (Child.GetNodeName() == el_require)
|
if (Child.GetNodeName() == el_require)
|
||||||
{
|
{
|
||||||
if (Attrs.GetNamedItem(at_shaders) == "fixed")
|
if (Attrs.GetNamedItem(at_shaders) == "arb")
|
||||||
{
|
|
||||||
// FFP not supported by OpenGL ES
|
|
||||||
#if CONFIG2_GLES
|
|
||||||
isUsable = false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else if (Attrs.GetNamedItem(at_shaders) == "arb")
|
|
||||||
{
|
{
|
||||||
if (!hasARB)
|
if (!hasARB)
|
||||||
isUsable = false;
|
isUsable = false;
|
||||||
|
@ -89,17 +89,11 @@ public:
|
|||||||
const std::map<CStrIntern, int>& vertexAttribs,
|
const std::map<CStrIntern, int>& vertexAttribs,
|
||||||
int streamflags);
|
int streamflags);
|
||||||
|
|
||||||
/**
|
|
||||||
* Construct an instance of a pre-defined fixed-function pipeline setup.
|
|
||||||
*/
|
|
||||||
static CShaderProgram* ConstructFFP(const std::string& id, const CShaderDefines& defines);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a uniform attribute or texture binding.
|
* Represents a uniform attribute or texture binding.
|
||||||
* For uniforms:
|
* For uniforms:
|
||||||
* - ARB shaders store vertex location in 'first', fragment location in 'second'.
|
* - ARB shaders store vertex location in 'first', fragment location in 'second'.
|
||||||
* - GLSL shaders store uniform location in 'first', data type in 'second'.
|
* - GLSL shaders store uniform location in 'first', data type in 'second'.
|
||||||
* - FFP shaders store -1 in 'first', index in 'second'.
|
|
||||||
* For textures, all store texture target (e.g. GL_TEXTURE_2D) in 'first', texture unit in 'second'.
|
* For textures, all store texture target (e.g. GL_TEXTURE_2D) in 'first', texture unit in 'second'.
|
||||||
* Non-existent bindings must store -1 in both.
|
* Non-existent bindings must store -1 in both.
|
||||||
*/
|
*/
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user