mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-24 10:02:08 -05:00
Fix orientation of top/bottom faces (thanks goodlyay), closes #186.
This commit is contained in:
parent
66e9329eb4
commit
ea7b4d743d
1 changed files with 8 additions and 10 deletions
|
@ -1,7 +1,5 @@
|
|||
// ClassicalSharp copyright 2014-2016 UnknownShadow200 | Licensed under MIT
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using ClassicalSharp.Events;
|
||||
using ClassicalSharp.GraphicsAPI;
|
||||
using OpenTK;
|
||||
|
@ -102,16 +100,16 @@ namespace ClassicalSharp.Renderers {
|
|||
*vertices++ = new VertexP3fT2fC4b( -pos, pos, -pos, rec.U1, rec.V1, FastColour.White );
|
||||
// Render the top quad
|
||||
rec = new TextureRec( 1/4f, 0/2f, 1/4f, 1/2f );
|
||||
*vertices++ = new VertexP3fT2fC4b( -pos, pos, -pos, rec.U1, rec.V2, FastColour.White );
|
||||
*vertices++ = new VertexP3fT2fC4b( -pos, pos, pos, rec.U1, rec.V1, FastColour.White );
|
||||
*vertices++ = new VertexP3fT2fC4b( pos, pos, pos, rec.U2, rec.V1, FastColour.White );
|
||||
*vertices++ = new VertexP3fT2fC4b( pos, pos, -pos, rec.U2, rec.V2, FastColour.White );
|
||||
*vertices++ = new VertexP3fT2fC4b( -pos, pos, -pos, rec.U2, rec.V2, FastColour.White );
|
||||
*vertices++ = new VertexP3fT2fC4b( -pos, pos, pos, rec.U2, rec.V1, FastColour.White );
|
||||
*vertices++ = new VertexP3fT2fC4b( pos, pos, pos, rec.U1, rec.V1, FastColour.White );
|
||||
*vertices++ = new VertexP3fT2fC4b( pos, pos, -pos, rec.U1, rec.V2, FastColour.White );
|
||||
// Render the bottom quad
|
||||
rec = new TextureRec( 2/4f, 0/2f, 1/4f, 1/2f );
|
||||
*vertices++ = new VertexP3fT2fC4b( -pos, -pos, -pos, rec.U1, rec.V1, FastColour.White );
|
||||
*vertices++ = new VertexP3fT2fC4b( -pos, -pos, pos, rec.U1, rec.V2, FastColour.White );
|
||||
*vertices++ = new VertexP3fT2fC4b( pos, -pos, pos, rec.U2, rec.V2, FastColour.White );
|
||||
*vertices++ = new VertexP3fT2fC4b( pos, -pos, -pos, rec.U2, rec.V1, FastColour.White );
|
||||
*vertices++ = new VertexP3fT2fC4b( -pos, -pos, -pos, rec.U2, rec.V2, FastColour.White );
|
||||
*vertices++ = new VertexP3fT2fC4b( -pos, -pos, pos, rec.U2, rec.V1, FastColour.White );
|
||||
*vertices++ = new VertexP3fT2fC4b( pos, -pos, pos, rec.U1, rec.V1, FastColour.White );
|
||||
*vertices++ = new VertexP3fT2fC4b( pos, -pos, -pos, rec.U1, rec.V2, FastColour.White );
|
||||
vb = game.Graphics.CreateVb( start, VertexFormat.P3fT2fC4b, count );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue