mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Merge pull request #1116 from Lopuska/patch-16
Intel OpenGL - fix a crash/shader compile error when you activate Vertex...
This commit is contained in:
commit
25a790103e
|
|
@ -1422,6 +1422,13 @@ void VertLitGLSL::processVert( Vector<ShaderComponent*> &componentList,
|
|||
Var* outColor = dynamic_cast< Var* >( LangElement::find( "vertColor" ) );
|
||||
if( !outColor )
|
||||
{
|
||||
// Grab the connector color
|
||||
ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>( componentList[C_CONNECTOR] );
|
||||
Var *outColor = connectComp->getElement( RT_COLOR );
|
||||
outColor->setName( "vertColor" );
|
||||
outColor->setStructName( "OUT" );
|
||||
outColor->setType( "vec4" );
|
||||
|
||||
// Search for vert color
|
||||
Var *inColor = (Var*) LangElement::find( "diffuse" );
|
||||
|
||||
|
|
@ -1432,13 +1439,6 @@ void VertLitGLSL::processVert( Vector<ShaderComponent*> &componentList,
|
|||
return;
|
||||
}
|
||||
|
||||
// Grab the connector color
|
||||
ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>( componentList[C_CONNECTOR] );
|
||||
Var *outColor = connectComp->getElement( RT_COLOR );
|
||||
outColor->setName( "vertColor" );
|
||||
outColor->setStructName( "OUT" );
|
||||
outColor->setType( "vec4" );
|
||||
|
||||
output = new GenOp( " @ = @;\r\n", outColor, inColor );
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue