|
|
@ -118,6 +118,9 @@ namespace NL3D
|
|
|
|
|
|
|
|
|
|
|
|
bool CDriverGL3::renderTriangles2( CMaterial &mat, uint32 startIndex, uint32 numTris )
|
|
|
|
bool CDriverGL3::renderTriangles2( CMaterial &mat, uint32 startIndex, uint32 numTris )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if( !setupMaterial( mat ) )
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
if( !setupProgram( mat ) )
|
|
|
|
if( !setupProgram( mat ) )
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
@ -186,9 +189,7 @@ namespace NL3D
|
|
|
|
p->attachPixelProgram( pp );
|
|
|
|
p->attachPixelProgram( pp );
|
|
|
|
if( !p->link( log ) )
|
|
|
|
if( !p->link( log ) )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
delete vp;
|
|
|
|
|
|
|
|
vp = NULL;
|
|
|
|
vp = NULL;
|
|
|
|
delete pp;
|
|
|
|
|
|
|
|
pp = NULL;
|
|
|
|
pp = NULL;
|
|
|
|
delete p;
|
|
|
|
delete p;
|
|
|
|
p = NULL;
|
|
|
|
p = NULL;
|
|
|
@ -206,6 +207,13 @@ namespace NL3D
|
|
|
|
setUniformMatrix4fv( mvpIndex, 1, false, mat.get() );
|
|
|
|
setUniformMatrix4fv( mvpIndex, 1, false, mat.get() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch( mat.getShader() )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
case CMaterial::Normal:
|
|
|
|
|
|
|
|
setupNormalPass();
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|