Skip to main content
gamedev.net
๐Ÿ”’ Locked

Disable RenderState

Started by Antonym Jun 9, 2010 at 10:16 AM 1 replies 750+ views
Original Post
Antonym
Antonym
So I have set things up so that whatever I draw adds up to whatever I draw behind it.

	app->d3d->d3d_device->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_DESTALPHA);


Though I've been having trouble disabling it temporarily.
I've tried
	app->d3d->d3d_device->SetRenderState(D3DRS_DESTBLEND,FALSE);

and then setting it again but it doesn't get set again, it becomes disabled permanently.

I also tried D3DBLEND_ZERO and D3DBLEND_ONE but to no avail.

Any help is appreciated.
Evil Steve
Evil Steve
To disable alpha blending you need to set D3DRS_ALPHABLENDENABLE to FALSE. Setting D3DRS_DESTBLEND to FALSE (0) isn't valid, because there's no D3DBLEND type with the value 0.
Antonym
Antonym
Thanks! That did the charm. I was also forgetting to flush ^_^'.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.