Re: render particle
Kent Quirk <[email protected]> Mon, 06 Mar 2006 19:44:24 -0800
| Newsgroups | gmane.games.devel.opengl |
|---|---|
| Organization | Fat City Network Services, San Diego, California |
| Message-ID | <[email protected]> |
Andras has good advice.
But if you're reluctant to use OpenGL sprites because you want to use
OpenGL 1.1, then you could also consider rendering each particle as a
single billboarded (always facing the camera) triangle.
You can render them with alpha on and use a texture with a circular
gradient (solid in the middle, transparent at the edges). If you use the
"Flyweight" pattern you can treat all the particles in one as having
common attributes and minimize state changes.
It's old technology, but it's been proven in many games. And if your
target is that low, you probably want to consider it.
Kent
Andras Balogh wrote:
> First, you'll probably be limited by fillrate way before you'll be
> limited by vertex transforms. But even if not, next you'll be limited
> by bus bandwidth, and points need 4 times less bandwidth than quads.
> Finally, the only time you might want to micro-optimize like this, is
> when you're competing with johnc, but then you probably wouldn't need
> our advice ;)
>
> Trust me, getting rid of camera transformation is not an
> optimization. There's so much more going on that this won't make the
> slightest difference! I'm sure you've heard this before: "Premature
> optimization is the root of all evil". Always go with the simplest
> solution, and then optimize the bottleneck. It makes no sense to
> optimize something that is not even the bottleneck! You'll end up
> with more complicated, less flexible and probably slower code.
>
> Of course, sprites have their problems, like HW dependent size limit
> (most cards max out at 64x64 pixels), but that's not a speed issue,
> but a feature issue.
>
>
> Andras
-----
FAQ and OpenGL Resources at:
http://www.geocities.com/SiliconValley/Hills/9956/OpenGL
--
Author: Kent Quirk
INET: [email protected]
Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [email protected] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).