Updating MonoGame-specific offset as it's not required anymore.

internals
Zaafar 4 years ago
parent 49aa2d9faf
commit c56b19b6ae
  1. 10
      src/ImGui.NET.SampleProgram.XNA/ImGuiRenderer.cs

@ -195,17 +195,9 @@ namespace ImGuiNET.SampleProgram.XNA
var io = ImGui.GetIO(); var io = ImGui.GetIO();
// MonoGame-specific //////////////////////
var offset = .5f;
///////////////////////////////////////////
// FNA-specific ///////////////////////////
//var offset = 0f;
///////////////////////////////////////////
_effect.World = Matrix.Identity; _effect.World = Matrix.Identity;
_effect.View = Matrix.Identity; _effect.View = Matrix.Identity;
_effect.Projection = Matrix.CreateOrthographicOffCenter(offset, io.DisplaySize.X + offset, io.DisplaySize.Y + offset, offset, -1f, 1f); _effect.Projection = Matrix.CreateOrthographicOffCenter(0f, io.DisplaySize.X, io.DisplaySize.Y, 0f, -1f, 1f);
_effect.TextureEnabled = true; _effect.TextureEnabled = true;
_effect.Texture = texture; _effect.Texture = texture;
_effect.VertexColorEnabled = true; _effect.VertexColorEnabled = true;

Loading…
Cancel
Save