From 78b4b043a4fe6be84dd36717c832951a0a464f63 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 10 Mar 2026 01:51:38 +0000 Subject: Switch frame and render buffer to DSA helpers --- gfx/gl/billboardPainter.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'gfx/gl/billboardPainter.cpp') diff --git a/gfx/gl/billboardPainter.cpp b/gfx/gl/billboardPainter.cpp index 91d9168..878e950 100644 --- a/gfx/gl/billboardPainter.cpp +++ b/gfx/gl/billboardPainter.cpp @@ -67,12 +67,10 @@ BillboardPainter::renderBillBoard(const glTextures & bil glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBindFramebuffer(GL_FRAMEBUFFER, fbo); glClearColor(0, 0, 0, 0); - glFramebufferTexture(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, billboard[0], 0); - glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, billboard[1], 0); - glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, billboard[2], 0); - if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { - throw std::runtime_error("Billboard framebuffer not complete!"); - } + fbo.texture(GL_DEPTH_ATTACHMENT, billboard[0]); + fbo.texture(GL_COLOR_ATTACHMENT0, billboard[1]); + fbo.texture(GL_COLOR_ATTACHMENT1, billboard[2]); + fbo.assertComplete(); if (texture) { texture->bind(0); } -- cgit v1.3