Jump to content
  • Advertisement
Sign in to follow this  
yk_cadcg

dx10 Counterpart of ColorFill() in dx9?

This topic is 4056 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

Hi, dx9 has ColorFill() to init a texture, what's the counterpart func in dx10? Map()->memset is not for non-mappable texture. so.. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Surfaces are always initialized to zero at creation but if you need to explicitely fill it with a color the counterpart to colorfill is ClearRenderTargetView. Note that it doesn't work to fill with a specific "INTEGER" value (unless it can be converted to float and back without loss), in that case you need to fill it with a QUAD and a shader manually.
Also you need to be able to create a rendertargetview (it doesn't require to be bound at clear time though and doesn't interfere with those that are currently bound).

LeGreg

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!