mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Added GraphicsContext, SwapChain, Buffer, VertexBuffer, IndexBuffer and a basic DX11 implementation.
31 lines
796 B
Beef
31 lines
796 B
Beef
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;
|
|
}
|
|
}
|
|
}
|