mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Cleanup
This commit is contained in:
@@ -16,8 +16,6 @@ namespace Sandbox
|
||||
{
|
||||
class ExampleLayer2D : Layer
|
||||
{
|
||||
RasterizerState _rasterizerState ~ _?.ReleaseRef();
|
||||
|
||||
GraphicsContext _context ~ _?.ReleaseRef();
|
||||
DepthStencilTarget _depthTarget ~ _?.ReleaseRef();
|
||||
|
||||
@@ -43,10 +41,6 @@ namespace Sandbox
|
||||
|
||||
_context = Application.Get().Window.Context..AddRef();
|
||||
|
||||
// Create rasterizer state
|
||||
GlitchyEngine.Renderer.RasterizerStateDescription rsDesc = .(.Solid, .Back, false, 0);
|
||||
_rasterizerState = new RasterizerState(rsDesc);
|
||||
|
||||
_depthTarget = new DepthStencilTarget(_context.SwapChain.Width, _context.SwapChain.Height);
|
||||
|
||||
_checkerTexture = new Texture2D("content/Textures/Checkerboard.dds");
|
||||
@@ -79,7 +73,7 @@ namespace Sandbox
|
||||
|
||||
_textureViewer = new TextureViewer();
|
||||
|
||||
cameraController = new OrthographicCameraController(16 / 9f);
|
||||
cameraController = new OrthographicCameraController(_context.SwapChain.AspectRatio);
|
||||
|
||||
DepthStencilStateDescription dssDesc = .()
|
||||
{
|
||||
@@ -106,8 +100,6 @@ namespace Sandbox
|
||||
RenderCommand.SetDepthStencilTarget(_depthTarget);
|
||||
RenderCommand.BindRenderTargets();
|
||||
|
||||
RenderCommand.SetRasterizerState(_rasterizerState);
|
||||
|
||||
RenderCommand.SetViewport(_context.SwapChain.BackbufferViewport);
|
||||
|
||||
Renderer2D.BeginScene(cameraController.Camera, .BackToFront);
|
||||
|
||||
Reference in New Issue
Block a user