public static void draw(Texture tex) { GraphicsDevice.Instance.SetRasterizerState(_rasterizerState); GraphicsDevice.Instance.SetDepthStencilState(_depthStencilState); Graphics2D.Instance.SetTexture(tex); Graphics2D.Instance.SetMatrix(_world * _viewing * _projection); Graphics2D.Instance.DrawTexture(); }
public static void drawThreshold(Texture tex, float u0, float v0, float u1, float v1) { GraphicsDevice.Instance.SetRasterizerState(_rasterizerState); GraphicsDevice.Instance.SetDepthStencilState(_depthStencilState); Graphics2D.Instance.SetTexture(tex); Graphics2D.Instance.SetMatrix(_world * _viewing * _projection); Graphics2D.Instance.SetColorThreshold(0, 0, 0, 0, 1, 1, 1, 1); Graphics2D.Instance.SetTextureThreshold(u0, v0, u1, v1); Graphics2D.Instance.DrawTextureWithThreshold(); }
public static void draw(Texture tex, float u0, float v0, float u1, float v1) { GraphicsDevice.Instance.SetRasterizerState(_rasterizerState); GraphicsDevice.Instance.SetDepthStencilState(_depthStencilState); Graphics2D.Instance.SetTexture(tex); Graphics2D.Instance.SetMatrix(_world * _viewing * _projection); Graphics2D.Instance.SetVertexPositions(-0.5f, 0.5f, 0.5f, -0.5f); Graphics2D.Instance.SetTextureCoords(u0, v0, u1, v1); Graphics2D.Instance.DrawTextureWithDynamical(); }