   How slow are draw calls?
  I am wondering just how slow draw calls are? I am making a UI system and I am batching then into vertex buffers, but occasionally I want to redraw a small subset of the UI but its going to take some reworking. If I draw the elements in order of texture so that I only switch to each texture once shouldn't it draw each  element using the same texture about as fast as if they were all in the same vertex buffer?J   
  In D3D 9 and before, a Draw call causes a task switch (as it has to change CPU permission levels) which makes them more costly than OpenGL draw calls. That being said, D3D 10 removes that task switch, making them cost about the same.As far as your question goes, why can't you make the UI elements be pieces of a single texture? I can't imagine that you would need a single texture just for a button or the like. Instead of you combine them into 1 texture and just use texture coordinates to address the various pieces, it will help you to avoid multiple draw calls. Although, that may or may not be a viable solution depending on how you've designed things.   ;  Well I am trying to design it similar to WinFX. That is an element can be made up a multiple sub elements but technically each element is either a container( containing other elements ) or a single draw element made up of a vector path and a texture.Having said that I do plan to have 1 or more big texture maps that are bascially all my UI textures fit onto a large bitmap ( or possibly making a system to automate it in the future ).I had been thinking of switching to OpenGL, maybe this is the straw that breaks my back... I dont want to wait for D3D10.. unless its not Vista only, but I belive it is.Jason   ;Quote:Original post by WashuI can't imagine that you would need a single texture just for a button or the likeBelieve it!  I definitely use 512x512 and larger textures for some GUI elements/buttons etc.  Most of them are fairly large with 16-32 frames of animation, but batching is a very real problem if you have high quality and/or animated UI elements and lots of them on the screen at once.  I would love to put them into 4096x4096 (or 2048x2048) textures or whatever but it's not sufficiently supported yet for my tastes, plus it would probably be slower...