mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-22 15:05:32 +00:00
38 lines
833 B
C#
38 lines
833 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using OpenTK.Graphics.OpenGL;
|
|
|
|
namespace PckStudio.Rendering
|
|
{
|
|
public class FrameBuffer
|
|
{
|
|
private int _id;
|
|
private FramebufferErrorCode status;
|
|
|
|
public FramebufferErrorCode Status => status;
|
|
public FrameBuffer()
|
|
{
|
|
_id = GL.GenFramebuffer();
|
|
}
|
|
|
|
public void Bind()
|
|
{
|
|
GL.BindFramebuffer(FramebufferTarget.Framebuffer, _id);
|
|
}
|
|
|
|
public void Unbind()
|
|
{
|
|
GL.BindFramebuffer(FramebufferTarget.Framebuffer, 0);
|
|
}
|
|
|
|
internal void CheckStatus()
|
|
{
|
|
status = GL.CheckFramebufferStatus(FramebufferTarget.Framebuffer);
|
|
}
|
|
}
|
|
}
|