Fastest GUI Rendering tecnique?

Started by
7 comments, last by rpg_code_master 18 years, 8 months ago
What of these is fastest of rendering the Gui elements( windows( not the operating system :) ).. 1. Construct a quad and apply a terxture to it.. 2. Using sprites. and what is the pros/cons of using these different tecniques? / Christoffer Nyberg
/ Christoffer Nyberg( www.christoffernyberg.com )
Advertisement
I think you're going to have to clarify, how are these two different, when I draw sprites I draw a quad with a texture, so I'm not clear on how they are different. If you are asking which is faster using 3D accelerated quads or drawing directly to the screen (like GDI on Windows) the answer is 3D accelerated quads unless the user doesn't have a graphics card.
I Mean The D3DXSPRITE Class, against a custom designed( very light ) GUIQuad class..
/ Christoffer Nyberg( www.christoffernyberg.com )
If you think you must optimize GUI rendering, perhaps using vertex buffers or the like, forget it. Just render them. Use sprites or whatever you like.
From what I know, the D3DX routines are as optimized as they could get. Go ahead and use them!
In terms of 'fast' I'd think development speed is the important thing. Even a fancy GUI element will only have maybe 20-50 polys so you'll have to try quite hard to get even 1000 GUI polygons on screen.
I would use the vertex/index buffers to make the gui. Then you could give them shaders and such.
Insufficent Information: we need more infromationhttp://staff.samods.org/aiursrage2k/
with one texture sprites you can prevent costly state changes for different textures in gui "easily" and when you r dealing with gui minimum state change is more importatnt than drawing speed in most cases. ;)
+-+-+-+-+-STR
Rendering a GUI using almost any method would be fast. Considering that any window would have a maximum of 2 polygons (if you want a non-quadrilateral shaped window, use alpha map collision). You would simply have a textured quad, with x amount of textures. Each button would have 2 polys, scrollbar 6-8 etc... (the same rule applies for non quadrilateral components). The only real speed issue is the traversal through the windows to the components, but even that is not too much trouble. I do however find though, that using OpenGL, rendering a large 2D window with 3D objects also does tend to lower the FPS a little. (For an example of what I have done, check my engine in my sig.)

This topic is closed to new replies.

Advertisement