public override void SetTextureMatrix( int stage, Matrix4 xform )
{
if ( stage >= _fixedFunctionTextureUnits )
{
//can't do this
return;
}
if ( !ActivateGLTextureUnit( stage ) )
return;
float[] mat = new float[ 16 ];
MakeGLMatrix( ref mat, xform );
OpenGL.MatrixMode( All.Texture );
GLESConfig.GlCheckError( this );
// Load this matrix in
OpenGL.LoadMatrix( mat );
GLESConfig.GlCheckError( this );
if ( _useAutoTextureMatrix )
{
// Concat auto matrix
OpenGL.MultMatrix( _autoTextureMatrix );
}
OpenGL.MatrixMode( All.Modelview );
GLESConfig.GlCheckError( this );
ActivateGLTextureUnit( 0 );
}