Render basic geometry

Added GraphicsContext, SwapChain, Buffer, VertexBuffer, IndexBuffer and a basic DX11 implementation.
This commit is contained in:
Simon Lübeß
2020-11-25 13:03:40 +01:00
parent 0237e0b38d
commit 5954fbc411
20 changed files with 1219 additions and 180 deletions
+30
View File
@@ -0,0 +1,30 @@
namespace GlitchyEngine.Renderer
{
public struct Viewport
{
/// X position of the left hand side of the viewport.
public float Left;
/// Y position of the top of the viewport. Ranges between BoundsMin and BoundsMax.
public float Top;
/// Width of the viewport.
public float Width;
/// Height of the viewport.
public float Height;
/// Minimum depth of the viewport. Ranges between 0 and 1.
public float MinDepth;
/// Maximum depth of the viewport. Ranges between 0 and 1.
public float MaxDepth;
public this() => this = default;
public this(float left, float top, float width, float height, float minDepth = 0.0f, float maxDepth = 1.0f)
{
Left = left;
Top = top;
Width = width;
Height = height;
MinDepth = minDepth;
MaxDepth = maxDepth;
}
}
}