Original Post
Hi all,
I''ve just fixed this incredible bug in my font engine after many weeks of debugging where the text was *sometimes* partially corrupted on my GF3 and disappeared completely on refrast and Radeon 7500, due to me not initializing ''rhw'' component of my vertices. Now it''s time to do some optimizations.
Currently all text is rendered through one (global) dynamic vertex buffer. I''m doing two kinds of major state changes: 1) changing texture for different fonts and 2) changing vertex shader from XYZ|NORMAL for untransformed vertices to XYZRHW for transformed ones (I''m using fixed functions pipeline). I want to sort all render requests, so my quesion is this: what is more expensive: changing the texture or changing the vertex shader? I assume that smaller state changes such as culling and filtering are the least expensive of these three, is this correct?