mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-06 05:01:53 +00:00
Render basic geometry
Added GraphicsContext, SwapChain, Buffer, VertexBuffer, IndexBuffer and a basic DX11 implementation.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user