iamgreaser / iceball

Open-source rewrite of the VOXLAP version of Ace of Spades.
http://iceball.build
GNU General Public License v3.0
113 stars 32 forks source link

No FBO support today #167

Open iamgreaser opened 9 years ago

iamgreaser commented 9 years ago

Pretty much reliant on #166 to be useful, but could possibly be done before that.

Gory details of what FBOs actually are: https://www.opengl.org/wiki/Framebuffer_Object

Suggested API, which will probably be revised:

We should also allow use of "fbo" references in place of img when blitting to the GPU, so we can avoid a redundant back-and-forth transfer. That is, client.img_blit and client.varender* will need to accept "fbo" references into their hearts.

Due to the fact that we garbage-collect image objects, we cannot just simply bind an image to an FBO.

iamgreaser commented 9 years ago

Should probably mention what we have now:

FBO support is still required for VAs... and map_render once we get around to supporting textures with maps.

Question for VA support: How do we handle FBOs being passed as textures?

I suspect we'll have to make it so if the FBO is passed twice in a row, the second instance is the depth attachment; otherwise we only use the colour attachment.

iamgreaser commented 9 years ago

VAs now accept FBOs, but the depth attachment is still unused.