I need your help. I´m writting a graphics engine and now I want to use Font system with ID3XFont.
This engine don´t have z-order and all objects are drawn at render order.
All works fine but now when I use ID3DXfont, text are drawn on top of all objects and I cant understand why.
[ Calculate position, alpha, texture clip, ...
and draw texture with LPDIRECT3DDEVICE9->DrawPrimitiveUP(...) ]
And my TextObject draw text in a D3DXSprite with a D3DXFont as
pTextSprite->Begin(D3DXSPRITE_ALPHABLEND | D3DXSPRITE_SORT_TEXTURE);
font->drawText(pTextSprite, text, 0,0,Color, Alignment);
I draw a background, then a text object and the many other objects which should be over the text
but the result is that text are drawn over all objects.