Game Development Community

dev|Pro Game Development Curriculum

Alpha Framebuffer Support

by Andreas Kirsch · 07/12/2007 (2:04 pm) · 2 comments

Download Code File

This is a small but imo useful patch that makes TGE or TGB create framebuffers with alpha channels.

You can query whether the current framebuffer has an alpha channel by querying gGLState.suppAlphaBuffer.

The smooth HUD borders in Shelled/GravGolf were only possible with alpha buffer support:
www.godallman.com/gg/gravgolf-2.JPG(I'm cross-linking to Joshua's GravGolf screenshots here.)

Simply apply the patch using patch -p0 -i alphaframebuffer.diff in the engine/source dir or use SVN Tortoise's "Apply Patch.." feature.

This patch was both tested with TGE 1.4.2 and TGB 1.1.3.

#1
07/19/2007 (11:47 pm)
I don't really get what the benefit of this one is. Could I, for instance, use it to create a pitch black scene in which only lighted parts of the level are visible?
#2
11/05/2007 (1:11 am)
With this patch the framebuffer gets an alpha channel, too, so you can render to it and create more advanced alpha blending effects. Without it alpha blending always behaves as if the dst flag was GL_ONE.
Cheers,
Andeas