mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
gl_Tangent and gl_Binormal
This commit is contained in:
parent
a09bb8a154
commit
8609b6e6b1
@ -39,15 +39,11 @@ valid() {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: GLShaderContext::uses_custom_vertex_arrays
|
||||
// Access: Public
|
||||
// Description: Returns false in case of GLSL, true in case of Cg.
|
||||
// Description: Always true, for now.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE bool CLP(ShaderContext)::
|
||||
uses_custom_vertex_arrays() {
|
||||
#ifdef OPENGLES_2
|
||||
return true;
|
||||
#else
|
||||
return (_shader->get_language() == Shader::SL_Cg);
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
@ -379,6 +379,24 @@ CLP(ShaderContext)(Shader *s, GSG *gsg) : ShaderContext(s) {
|
||||
gsg->_glBindAttribLocation(_glsl_program, i, param_name);
|
||||
continue;
|
||||
}
|
||||
if (noprefix.substr(0, 7) == "Tangent") {
|
||||
bind._name = InternalName::get_tangent();
|
||||
if (noprefix.size() > 7) {
|
||||
bind._append_uv = atoi(noprefix.substr(7).c_str());
|
||||
}
|
||||
s->_var_spec.push_back(bind);
|
||||
gsg->_glBindAttribLocation(_glsl_program, i, param_name);
|
||||
continue;
|
||||
}
|
||||
if (noprefix.substr(0, 8) == "Binormal") {
|
||||
bind._name = InternalName::get_binormal();
|
||||
if (noprefix.size() > 8) {
|
||||
bind._append_uv = atoi(noprefix.substr(8).c_str());
|
||||
}
|
||||
s->_var_spec.push_back(bind);
|
||||
gsg->_glBindAttribLocation(_glsl_program, i, param_name);
|
||||
continue;
|
||||
}
|
||||
if (noprefix.substr(0, 13) == "MultiTexCoord") {
|
||||
bind._name = InternalName::get_texcoord();
|
||||
bind._append_uv = atoi(inputname->get_name().substr(13).c_str());
|
||||
|
Loading…
x
Reference in New Issue
Block a user