]> git.tdb.fi Git - libs/gl.git/commit
Refactor texture attachment management in Framebuffer
authorMikko Rasa <tdb@tdb.fi>
Wed, 21 Apr 2021 10:09:03 +0000 (13:09 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 21 Apr 2021 10:09:03 +0000 (13:09 +0300)
commitccd636b2fa8b9f270fbe600629dd109e78d00992
tree7afc78c5c0d84f6b97929e49ad6f327bbce72e50
parent91e65bc9e24a6889995081035f6f6f0a78a6c20e
Refactor texture attachment management in Framebuffer

Duplicated code from the attach functions has been collapsed into a
helper function.

Attaching a texture does not need binding it, so there's little point
in deferring the allocation to update_attachment.  By calling the type-
specific allocate function in attach, update_attachment can be simpler.
source/core/framebuffer.cpp
source/core/framebuffer.h