diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-03-10 01:51:38 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-03-10 01:51:38 +0000 |
| commit | 78b4b043a4fe6be84dd36717c832951a0a464f63 (patch) | |
| tree | bc82ca1c59d309491323779ebbe3195b4479b546 /gfx/gl/billboardPainter.cpp | |
| parent | Switch to floating point, camera relative position buffer (diff) | |
| download | ilt-78b4b043a4fe6be84dd36717c832951a0a464f63.tar.bz2 ilt-78b4b043a4fe6be84dd36717c832951a0a464f63.tar.xz ilt-78b4b043a4fe6be84dd36717c832951a0a464f63.zip | |
Diffstat (limited to 'gfx/gl/billboardPainter.cpp')
| -rw-r--r-- | gfx/gl/billboardPainter.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
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<GL_TEXTURE_2D_ARRAY, 3> & 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); } |
