Move matrix setup after program use, such that the program is effective at that point. 2d works again without problems.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@3803 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
0f1f619fc6
commit
de1540ae9d
|
@ -1932,6 +1932,14 @@ namespace video
|
|||
if (static_cast<u32>(LastMaterial.MaterialType) < MaterialRenderers.size())
|
||||
MaterialRenderers[LastMaterial.MaterialType].Renderer->OnUnsetMaterial();
|
||||
}
|
||||
if (!OverrideMaterial2DEnabled)
|
||||
{
|
||||
setBasicRenderStates(InitMaterial2D, LastMaterial, true);
|
||||
LastMaterial = InitMaterial2D;
|
||||
}
|
||||
|
||||
TwoDRenderer->useProgram(); //Fixed Pipeline Shader needed to render 2D
|
||||
|
||||
if (Transformation3DChanged)
|
||||
{
|
||||
const core::dimension2d<u32>& renderTargetSize = getCurrentRenderTargetSize();
|
||||
|
@ -1943,13 +1951,6 @@ namespace video
|
|||
|
||||
Transformation3DChanged = false;
|
||||
}
|
||||
if (!OverrideMaterial2DEnabled)
|
||||
{
|
||||
setBasicRenderStates(InitMaterial2D, LastMaterial, true);
|
||||
LastMaterial = InitMaterial2D;
|
||||
}
|
||||
|
||||
TwoDRenderer->useProgram(); //Fixed Pipeline Shader needed to render 2D
|
||||
}
|
||||
if (OverrideMaterial2DEnabled)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue