mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
Update gfxGLShader.cpp
restore assertfatal if the bindPoint ==-1 as these require a location, ubo uniforms location returns -1
This commit is contained in:
parent
ab36fe24ec
commit
f40c20d2f4
1 changed files with 4 additions and 1 deletions
|
|
@ -889,7 +889,8 @@ void GFXGLShader::initHandles()
|
||||||
// Index element 1 of the name to skip the '$' we inserted earier.
|
// Index element 1 of the name to skip the '$' we inserted earier.
|
||||||
GLint loc = glGetUniformLocation(mProgram, &desc.name.c_str()[1]);
|
GLint loc = glGetUniformLocation(mProgram, &desc.name.c_str()[1]);
|
||||||
|
|
||||||
//AssertFatal(loc != -1, avar("uniform %s in shader file Vert: (%s) Frag: (%s)", &desc.name.c_str()[1], mVertexFile.getFullPath().c_str(), mPixelFile.getFullPath().c_str()));
|
// The location for uniforms inside a UBO come back as -1.
|
||||||
|
// AssertFatal(loc != -1, avar("uniform %s in shader file Vert: (%s) Frag: (%s)", &desc.name.c_str()[1], mVertexFile.getFullPath().c_str(), mPixelFile.getFullPath().c_str()));
|
||||||
|
|
||||||
HandleMap::Iterator handle = mHandles.find(desc.name);
|
HandleMap::Iterator handle = mHandles.find(desc.name);
|
||||||
S32 sampler = -1;
|
S32 sampler = -1;
|
||||||
|
|
@ -908,6 +909,7 @@ void GFXGLShader::initHandles()
|
||||||
{
|
{
|
||||||
if (desc.bindPoint == -1)
|
if (desc.bindPoint == -1)
|
||||||
{
|
{
|
||||||
|
AssertFatal(loc != -1, avar("uniform %s in shader file Vert: (%s) Frag: (%s)", &desc.name.c_str()[1], mVertexFile.getFullPath().c_str(), mPixelFile.getFullPath().c_str()));
|
||||||
desc.bindPoint = loc;
|
desc.bindPoint = loc;
|
||||||
mHandles[desc.name]->mUBOUniform = false;
|
mHandles[desc.name]->mUBOUniform = false;
|
||||||
}
|
}
|
||||||
|
|
@ -922,6 +924,7 @@ void GFXGLShader::initHandles()
|
||||||
{
|
{
|
||||||
if (desc.bindPoint == -1)
|
if (desc.bindPoint == -1)
|
||||||
{
|
{
|
||||||
|
AssertFatal(loc != -1, avar("uniform %s in shader file Vert: (%s) Frag: (%s)", &desc.name.c_str()[1], mVertexFile.getFullPath().c_str(), mPixelFile.getFullPath().c_str()));
|
||||||
desc.bindPoint = loc;
|
desc.bindPoint = loc;
|
||||||
mHandles[desc.name] = new GFXGLShaderConstHandle(this, desc);
|
mHandles[desc.name] = new GFXGLShaderConstHandle(this, desc);
|
||||||
mHandles[desc.name]->mUBOUniform = false;
|
mHandles[desc.name]->mUBOUniform = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue