Re: Keeping an object's label on the screen
"Monteleone, Nathan" <[email protected]>
| Newsgroups | gmane.games.devel.algorithms |
|---|---|
| Message-ID | <[email protected]> |
Unfortunately the terrain isn't very flat :-( ________________________________ From: Jeff Russell [mailto:[email protected]] Sent: Wednesday, April 29, 2009 1:43 PM To: Game Development Algorithms Subject: Re: [Algorithms] Keeping an object's label on the screen The idea I had in mind was to do something in screen space... I'd write out an object ID version of the projected texture, apply it, render the terrain geometry into a low-res buffer, then compute min/max screen coords for each object. Then I could just draw my text label in screen space based on that information. Is this a sane approach? Could be, if your object counts are reasonably small. If this is just sections of the terrain we're talking about, and your terrain is at least sort of flat, you could just project the bounds of these shapes into screen space and center your label accordingly. -- -------------------------------------------- Jeff Russell Engineer, 8monkey Labs www.8monkeylabs.com -------------------------------------------- ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ GDAlgorithms-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list