From c105bc3501ced25bb24bbd601e91538fecf047b8 Mon Sep 17 00:00:00 2001 From: notgiven688 <37874600+notgiven688@users.noreply.github.com> Date: Sat, 30 Nov 2024 20:09:22 +0100 Subject: [PATCH] Replace glNamedFramebufferDrawBuffer with glDrawBuffer in Framebuffer.cs (#206) --- src/JitterDemo/Renderer/OpenGL/Native/GL.cs | 10 +++++----- src/JitterDemo/Renderer/OpenGL/Objects/Framebuffer.cs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/JitterDemo/Renderer/OpenGL/Native/GL.cs b/src/JitterDemo/Renderer/OpenGL/Native/GL.cs index 3e657859..a6fcc346 100644 --- a/src/JitterDemo/Renderer/OpenGL/Native/GL.cs +++ b/src/JitterDemo/Renderer/OpenGL/Native/GL.cs @@ -83,9 +83,9 @@ private delegate void glFramebufferTexture2DDelegate(uint target, uint attachmen private static glFramebufferTexture2DDelegate glFramebufferTexture2D; - private delegate void glNamedFramebufferDrawBufferDelegate(uint framebuffer, uint buf); + private delegate void glDrawBufferDelegate(uint buf); - private static glNamedFramebufferDrawBufferDelegate glNamedFramebufferDrawBuffer; + private static glDrawBufferDelegate glDrawBuffer; private delegate void glBindBufferDelegate(uint target, uint buffer); @@ -338,7 +338,7 @@ public static void Load() glDebugMessageCallback = GetDelegate(); glGenerateMipmap = GetDelegate(); glBindBuffer = GetDelegate(); - glNamedFramebufferDrawBuffer = GetDelegate(); + glDrawBuffer = GetDelegate(); glFramebufferTexture2D = GetDelegate(); glBindFramebuffer = GetDelegate(); glGenBuffers = GetDelegate(); @@ -547,9 +547,9 @@ public static void BindBuffer(uint target, uint buffer) glBindBuffer(target, buffer); } - public static void NamedFramebufferDrawBuffer(uint framebuffer, uint buf) + public static void DrawBuffer(uint buf) { - glNamedFramebufferDrawBuffer(framebuffer, buf); + glDrawBuffer(buf); } public static void FramebufferTexture2D(uint target, uint attachment, uint textarget, uint texture, int level) diff --git a/src/JitterDemo/Renderer/OpenGL/Objects/Framebuffer.cs b/src/JitterDemo/Renderer/OpenGL/Objects/Framebuffer.cs index 201793cb..b939e61c 100644 --- a/src/JitterDemo/Renderer/OpenGL/Objects/Framebuffer.cs +++ b/src/JitterDemo/Renderer/OpenGL/Objects/Framebuffer.cs @@ -46,6 +46,6 @@ public void AttachDepthTexture(Texture2D texture) { Bind(); GL.FramebufferTexture2D(GLC.FRAMEBUFFER, GLC.DEPTH_ATTACHMENT, GLC.TEXTURE_2D, texture.Handle, 0); - GL.NamedFramebufferDrawBuffer(Handle, GLC.NONE); + GL.DrawBuffer(GLC.NONE); } } \ No newline at end of file