[Bf-committers] Occlusion Query based selection

Αντώνης Ρυακιωτάκης kalast at gmail.com
Sat Dec 3 17:02:32 CET 2011

Hi brecht, quickie answer and update for builders\testers(forgot to
include some fill rate optimization in the first patch posted here):
use the patch here http://www.pasteall.org/26958/diff instead.

About interference: the updated patch above turns off writing to the
color buffer (since it doesn't affect the occlusion test). If it is
strictly necessary to allocate an offscreen buffer though I see no
problem with that, apart from requiring a bit more recent hardware.
Multisample will be no problem I think, though i haven't tested it.

About avoiding counting: Initially I thought of using
BLI_dynamic_array_declare that I saw on bmesh but I couldn't find that
on trunk. Seeing how names are pushed in the selection stack further
down the code for bones etc, maybe a stack that stores names and
flushes them in the selection buffer if the occlusion test is
successful may be a good solution. (That way we can trivially maintain
compatibility with older graphics cards as well). Implementation can
be a file by itself, maybe GPU_occlusion_selection or something.

More information about the Bf-committers mailing list