[Bf-committers] Selection Highlighting (need advice regarding blenders selection code and OGL issues)

Geoffrey Bantle hairbat at yahoo.com
Tue Dec 20 03:42:49 CET 2005


Hello

Over the last couple weeks of tinkering I have
implemented selection hilighting and temporary
selections in blender 
(see: http://www.umsl.edu/~gcbq44/mergetools.html)

The basic approach I am taking is this: whenever the
mouse is moved a function called 'preselect hilight()'
is called. This function is responsible for flagging
vertex/edges/faces with the 'HILIGHT' and 'TEMP'
flags. To find out which element under the mouse
cursor to flag I found that the function
'unified_findnearest()' in editmesh_mods.c did exactly
as I wanted. I then modified the draw code in
drawobject.c to draw editmeshes with the temporary
selections and hilights.

It works rather well, that is for smaller meshes. Once
the face count gets up to around 5k or so on my system
things begin to slow down. I dont know if my video
card is to blame or if the approach I am taking is
just inherently slow. It does seem to me that
redrawing all 3d views  just because the hilighting
has changed is going to be rather slow, in which case
I had thought that maybe the hilights could be drawn
into a seperate buffer and composited with the
viewport image. On the other hand it is possible that
the overhead caused by the redraw is negligible and
the selection code in 'unified_findnearest()' is not
fast enough for my purposes. I intended to look into
the underlying code in that function but decided to
seek some help out first.

Any suggestions would be greatly appreciated.

Cheers
Geoffrey Bantle

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Bf-committers mailing list