|
|
@@ -580,6 +580,16 @@ void Batch::Prepare(View* view, Camera* camera, bool setModelTransform, bool all
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // Set zone texture if necessary
|
|
|
+#ifndef GL_ES_VERSION_2_0
|
|
|
+ if (zone_ && graphics->HasTextureUnit(TU_ZONE))
|
|
|
+ graphics->SetTexture(TU_ZONE, zone_->GetZoneTexture());
|
|
|
+#else
|
|
|
+ // On OpenGL ES set the zone texture to the environment unit instead
|
|
|
+ if (zone_ && zone_->GetZoneTexture() && graphics->HasTextureUnit(TU_ENVIRONMENT))
|
|
|
+ graphics->SetTexture(TU_ENVIRONMENT, zone_->GetZoneTexture());
|
|
|
+#endif
|
|
|
+
|
|
|
// Set material-specific shader parameters and textures
|
|
|
if (material_)
|
|
|
{
|
|
|
@@ -618,12 +628,6 @@ void Batch::Prepare(View* view, Camera* camera, bool setModelTransform, bool all
|
|
|
graphics->SetTexture(TU_LIGHTSHAPE, shapeTexture);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- // Set zone texture if necessary
|
|
|
-#ifdef DESKTOP_GRAPHICS
|
|
|
- if (zone_ && graphics->HasTextureUnit(TU_ZONE))
|
|
|
- graphics->SetTexture(TU_ZONE, zone_->GetZoneTexture());
|
|
|
-#endif
|
|
|
}
|
|
|
|
|
|
void Batch::Draw(View* view, Camera* camera, bool allowDepthWrite) const
|