Sign in to follow this  
XVincentX

Blending not wished

Recommended Posts

XVincentX    129
Hello, i'm having got a very strange problem. Simple using the most simple shader (Position and Texture mapping), there is this result. http://img379.imageshack.us/img379/7181/asdho6.jpg But as you can see, the eyes are visible even if they are behind face of Dino. What can be the problem? There is not any kind of blending active...!

Share this post


Link to post
Share on other sites
XVincentX    129
Wow...
I found the trouble


Testo->PreloadText("Non Instanced Mode",-1);
TestoI->PreloadText("Instanced Mode Enabled",-1);


Testo and TestoI are ID3DX10Font.

They make a mistake with the ID3D10Device (i do not know why).
To fix it, make a stateblock and


StateBlock->Capture();
Testo->PreloadText("Non Instanced Mode",-1);
TestoI->PreloadText("Instanced Mode Enabled",-1);
StateBlock->Apply();

Share this post


Link to post
Share on other sites
j14rk1n    122
Quote:
Original post by XVincentX
Wow...
I found the trouble


Testo->PreloadText("Non Instanced Mode",-1);
TestoI->PreloadText("Instanced Mode Enabled",-1);


Testo and TestoI are ID3DX10Font.

They make a mistake with the ID3D10Device (i do not know why).
To fix it, make a stateblock and


StateBlock->Capture();
Testo->PreloadText("Non Instanced Mode",-1);
TestoI->PreloadText("Instanced Mode Enabled",-1);
StateBlock->Apply();


My guess is that PreloadText() messes with the internal states on the graphics device which, in turn, messes with the rendering of your model in some way. (In this case, messes with the Z-buffering as was mentioned before.)

Stateblocks allow you to save graphics device states and restore them later, which is why that solution works.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this