Development Merge 2025.10.18 #4
@@ -14,11 +14,11 @@ public class TriangleBatch : ITriangleBatch
 | 
				
			|||||||
    private Matrix _view;
 | 
					    private Matrix _view;
 | 
				
			||||||
    private Matrix _projection;
 | 
					    private Matrix _projection;
 | 
				
			||||||
    private readonly BasicEffect basicEffect;
 | 
					    private readonly BasicEffect basicEffect;
 | 
				
			||||||
 | 
					    private readonly RasterizerState rasterizerState = new() { CullMode = CullMode.None };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public TriangleBatch(GraphicsDevice graphicsDevice)
 | 
					    public TriangleBatch(GraphicsDevice graphicsDevice)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        this.graphicsDevice = graphicsDevice;
 | 
					        this.graphicsDevice = graphicsDevice;
 | 
				
			||||||
        this.graphicsDevice.RasterizerState = new RasterizerState() { CullMode = CullMode.None };
 | 
					 | 
				
			||||||
        basicEffect = new(graphicsDevice);
 | 
					        basicEffect = new(graphicsDevice);
 | 
				
			||||||
        basicEffect.VertexColorEnabled = true;
 | 
					        basicEffect.VertexColorEnabled = true;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -58,6 +58,7 @@ public class TriangleBatch : ITriangleBatch
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    private void Flush()
 | 
					    private void Flush()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					        graphicsDevice.RasterizerState = rasterizerState;
 | 
				
			||||||
        basicEffect.Projection = _projection;
 | 
					        basicEffect.Projection = _projection;
 | 
				
			||||||
        basicEffect.View = _view;
 | 
					        basicEffect.View = _view;
 | 
				
			||||||
        vertexBuffer = new VertexBuffer(graphicsDevice, typeof(VertexPositionColor), 1024, BufferUsage.WriteOnly);
 | 
					        vertexBuffer = new VertexBuffer(graphicsDevice, typeof(VertexPositionColor), 1024, BufferUsage.WriteOnly);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user