Finally solved the problem. I have to download the CEGUI code and find out the render state it's setting so I can set them back. Apparently CEGUI called the following on directX device:
SetSamplerState( 0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP);
SetSamplerState( 0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP);
For some reason the clamp setting cause the sprite to use only the first pixel of the texture image. This is really weird. The reason behind it is still unknown to me. But now I just set them back to D3DTADDRESS_WRAP and that solves the problem. It proves that while these type of libraries are supposed to be black box, during debugging, it might be worth it to look into their code. (Yea, that's not supposed to happen but nothing in this world is perfect).
While at solving this problem, I also found some interesting directX classes such as LPDIRECT3DSTATEBLOCK9 and LPD3DXMATRIXSTACK, which is good.
An interesting link is also found: http://www.codesampler.com/dx9src/dx9src_2.htm
6 Oct 2008
Problem Solved
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment