But how does VBO help where you render a lot of particles which have different textures? there's a lot of texture state switches there, and you can only render about a quad per sprite, does using VBOs in that case help at all?
But how does VBO help where you render a lot of particles which have different textures? there's a lot of texture state switches there, and you can only render about a quad per sprite, does using VBOs in that case help at all?
This is my game project - Top Down City:
http://www.pascalgamedevelopment.com...y-Topic-Reboot
My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
http://www.pascalgamedevelopment.com...source+manager
VBO's can definitely increase your game's performance. To minimize texture changes, you should merge your small textures together and make a few big ones that contain different rectangles for animation-frames and particles (Tilesets). These are especially effective when you want to render particles and terrain tiles. I suggest you make one big texture for all your particles and render them all at once after you rendered the rest of you scene. This would avoid redundant texture changes and make your game alot faster.
Use a quad with appropriate texture coordinates to "select" a tile from your tileset and render it.
Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.
That is a design issue. Using lots of textures is always slowest way to go. If there is tens or hundreds of different particles you might consider drawing them all in a bigger bitmap in memory first and using that as 1 texture.Originally Posted by Delfi
I don't think you guys realise how complex it becomes to implement image atlas in a particle system that advanced as the one i have (think different pixel formats and sprite resolutions and include the per-gpu image size limit), and pretty soon managing all that becomes harder and the speed increase ends up being neglectible.
Do not say that the design is wrong, i was just pointing out that sometimes the VBOs don't go well with a existing system that was made to be something more than just sparks.
This is my game project - Top Down City:
http://www.pascalgamedevelopment.com...y-Topic-Reboot
My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
http://www.pascalgamedevelopment.com...source+manager
Well, everything is a design question, i've implemented texture patterns for the particle system in Phoenix, i made the design choise to keep it simple, only allowing for a rectangular particle grid of 2x2 4x4 or 8x8.Originally Posted by Delfi
See the source:
http://phoenixlib.net/files/phxParticles.pas
http://phoenixlib.net/files/phxParticleAffectors.pas
What was the problem with the different pixel formats? That really shouldnt matter if you're using OGL or D3D
And jdarling, yeah better MAC support would rock, i have no access to a mac or a linux distro through ;p
Amnoxx
Oh, and this code appears to be an approximate replacement for return(random() & 0x01);
Phoenix Wiki
http://www.phoenixlib.net/
Phoenix Forum
http://www.pascalgamedevelopment.com/viewforum.php?f=71
Bookmarks