mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Add a workaround for the 16 vertex attribute limit on nvidia gl
This commit is contained in:
parent
6283a6b9da
commit
ace01a313c
4 changed files with 11 additions and 19 deletions
|
|
@ -26,6 +26,7 @@
|
|||
#include "shaderGen/shaderComp.h"
|
||||
#include "shaderGen/langElement.h"
|
||||
#include "gfx/gfxDevice.h"
|
||||
#include "gfx/gl/gfxGLVertexAttribLocation.h"
|
||||
|
||||
|
||||
Var * AppVertConnectorGLSL::getElement( RegisterType type,
|
||||
|
|
@ -107,7 +108,8 @@ Var * AppVertConnectorGLSL::getElement( RegisterType type,
|
|||
newVar->constNum = mCurBlendIndicesElem;
|
||||
mElementList.push_back(newVar);
|
||||
char out[32];
|
||||
dSprintf((char*)out, sizeof(out), "vBlendIndex%d", mCurBlendIndicesElem);
|
||||
const U32 blendIndicesOffset = Torque::GL_VertexAttrib_BlendIndex0 - Torque::GL_VertexAttrib_TexCoord0;
|
||||
dSprintf((char*)out, sizeof(out), "vTexCoord%d", blendIndicesOffset + mCurBlendIndicesElem);
|
||||
mCurBlendIndicesElem += 1;
|
||||
newVar->setConnectName(out);
|
||||
return newVar;
|
||||
|
|
@ -119,7 +121,8 @@ Var * AppVertConnectorGLSL::getElement( RegisterType type,
|
|||
newVar->constNum = mCurBlendWeightsElem;
|
||||
mElementList.push_back(newVar);
|
||||
char out[32];
|
||||
dSprintf((char*)out, sizeof(out), "vBlendWeight%d", mCurBlendWeightsElem);
|
||||
const U32 blendWeightsOffset = Torque::GL_VertexAttrib_BlendWeight0 - Torque::GL_VertexAttrib_TexCoord0;
|
||||
dSprintf((char*)out, sizeof(out), "vTexCoord%d", blendWeightsOffset + mCurBlendWeightsElem);
|
||||
mCurBlendWeightsElem += 1;
|
||||
newVar->setConnectName(out);
|
||||
return newVar;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue