Added Summeries
This commit is contained in:
parent
71a22df8bd
commit
8296d9b8a9
47 changed files with 812 additions and 177 deletions
|
|
@ -1,10 +0,0 @@
|
|||
using OpenTK;
|
||||
using SM.Base.Window;
|
||||
|
||||
namespace SM2D
|
||||
{
|
||||
public interface I2DSetup : ISetup
|
||||
{
|
||||
Vector2? WorldScale { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -7,10 +7,12 @@ using SM2D.Shader;
|
|||
|
||||
namespace SM2D
|
||||
{
|
||||
public struct Window2DSetup : I2DSetup
|
||||
/// <summary>
|
||||
/// Sets up a 2D window.
|
||||
/// </summary>
|
||||
public struct Window2DSetup : ISetup
|
||||
{
|
||||
public Vector2? WorldScale { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Applied(IGenericWindow window)
|
||||
{
|
||||
window.ViewportCamera = new Camera();
|
||||
|
|
@ -18,16 +20,18 @@ namespace SM2D
|
|||
SMRenderer.DefaultMaterialShader = ShaderCollection.Instanced;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Load(IGenericWindow window)
|
||||
{
|
||||
(window.ViewportCamera as Camera).RequestedWorldScale = WorldScale;
|
||||
GL.Enable(EnableCap.DepthTest);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Loaded(IGenericWindow window)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Resize(IGenericWindow window)
|
||||
{
|
||||
Camera.ResizeCounter++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue