Skip to content

Commit

Permalink
Expose setting viewport via UseViewport on the graphics context
Browse files Browse the repository at this point in the history
  • Loading branch information
deccer committed Aug 14, 2023
1 parent 1b2276a commit 12e0ee8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/EngineKit/Graphics/GraphicsContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ public void CopyTexture(
RemoveFramebuffer(targetFramebufferDescriptor);
}

public void UseViewport(Viewport viewport)
{
GL.Viewport(viewport);
}

public IMeshPool CreateMeshPool(Label label, int vertexBufferCapacity, int indexBufferCapacity)
{
return new MeshPool(label, this, vertexBufferCapacity, indexBufferCapacity);
Expand Down
2 changes: 2 additions & 0 deletions src/EngineKit/Graphics/IGraphicsContext.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using EngineKit.Mathematics;

namespace EngineKit.Graphics;

Expand Down Expand Up @@ -112,4 +113,5 @@ void CopyTexture(
FramebufferDescriptor CreateSingleFramebufferDescriptorFromTexture(ITexture texture);

void ClearResourceBindings();
void UseViewport(Viewport viewport);
}

0 comments on commit 12e0ee8

Please sign in to comment.