Renderers should use the generic Gfx_DrawIndexedVb, only MapRenderer should use Gfx_DrawIndexedVb_TrisT2fC4b

This commit is contained in:
UnknownShadow200 2017-07-02 18:44:05 +10:00
parent 843138aed7
commit eef4167ac9
4 changed files with 6 additions and 6 deletions

View file

@ -54,7 +54,7 @@ namespace ClassicalSharp.Renderers {
gfx.BindTexture(sideTexId);
gfx.SetBatchFormat(VertexFormat.P3fT2fC4b);
gfx.BindVb(sidesVb);
gfx.DrawIndexedVb_TrisT2fC4b(sidesVertices * 6 / 4, 0);
gfx.DrawIndexedVb(DrawMode.Triangles, sidesVertices * 6 / 4, 0);
gfx.RestoreAlphaState(game.BlockInfo.Draw[block]);
gfx.Texturing = false;
@ -75,7 +75,7 @@ namespace ClassicalSharp.Renderers {
// Fixes some 'depth bleeding through' issues with 16 bit depth buffers on large maps.
float yVisible = Math.Min(0, map.Env.SidesHeight);
if (camPos.Y >= yVisible)
gfx.DrawIndexedVb_TrisT2fC4b(edgesVertices * 6 / 4, 0);
gfx.DrawIndexedVb(DrawMode.Triangles, edgesVertices * 6 / 4, 0);
gfx.RestoreAlphaState(game.BlockInfo.Draw[block]);
gfx.Texturing = false;

View file

@ -114,7 +114,7 @@ namespace ClassicalSharp.Renderers {
gfx.BindTexture(game.CloudsTex);
gfx.SetBatchFormat(VertexFormat.P3fT2fC4b);
gfx.BindVb(cloudsVb);
gfx.DrawIndexedVb_TrisT2fC4b(cloudVertices * 6 / 4, 0);
gfx.DrawIndexedVb(DrawMode.Triangles, cloudVertices * 6 / 4, 0);
gfx.AlphaTest = false;
gfx.Texturing = false;

View file

@ -55,7 +55,7 @@ Gfx_SetTexturing(false);
void BordersRenderer_RenderSides(Real64 delta) {
BlockID block = WorldEnv_SidesBlock;
BordersRenderer_SetupState(block, borders_sideTexId, borders_sidesVb)
Gfx_DrawIndexedVb_TrisT2fC4b(borders_sidesVertices * 6 / 4, 0);
Gfx_DrawIndexedVb(DrawMode_Triangles, borders_sidesVertices * 6 / 4, 0);
BordersRenderer_ResetState(block);
}
@ -69,7 +69,7 @@ void BordersRenderer_RenderEdges(Real64 delta) {
Vector3 camPos = Game_CurrentCameraPos;
Int32 yVisible = min(0, WorldEnv_SidesHeight);
if (camPos.Y >= yVisible) {
Gfx_DrawIndexedVb_TrisT2fC4b(borders_edgesVertices * 6 / 4, 0);
Gfx_DrawIndexedVb(DrawMode_Triangles, borders_edgesVertices * 6 / 4, 0);
}
BordersRenderer_ResetState(block);
}

View file

@ -76,7 +76,7 @@ void EnvRenderer_RenderClouds(Real64 delta) {
Gfx_BindTexture(env_cloudsTex);
Gfx_SetBatchFormat(VertexFormat_P3fT2fC4b);
Gfx_BindVb(env_cloudsVb);
Gfx_DrawIndexedVb_TrisT2fC4b(env_cloudVertices * 6 / 4, 0);
Gfx_DrawIndexedVb(DrawMode_Triangles, env_cloudVertices * 6 / 4, 0);
Gfx_SetAlphaTest(false);
Gfx_SetTexturing(false);