Sign in to follow this  

UnBind RenderTarget

This topic is 3741 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I'm getting a warning " A render target was detected as bound". I'm not using the fixed function pipeline, as I've seen examples online say call device->SetTexture(0,NULL) to unbind the texture. However, in the shader I have done the equivelant pEffect->SetTexture(handle,NULL) and still have the same results. So, how do you unbind a texture? Here are the steps im taking: 1- Store Original RenderTarget 2- Get Surface of my texture and set as RenderTarget 3- Render whatever 4- Restore Original RenderTarget 5- Render quad with my other texture (the one we just rendered into) 6- Swap buffers Any ideas? Thanks Jeff.

Share this post


Link to post
Share on other sites
Have you tried calling CommitChanges() after modifying a parameter in via the effect interface? I can't remember if it applies to textures, but ID3DXEffect doesn't always immediately update the actual pipeline state.

You can probably verify this by iterating over the actual device method and seeing if the warning message goes away...

hth
Jack

Share this post


Link to post
Share on other sites

This topic is 3741 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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