Jump to content
  • Advertisement
Sign in to follow this  
binpersonal

what is the best way to draw a 256 color colorbar?

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

Dear all, I want to draw a 256 color static colorbar on the screen, which is the best and fastest way to do that? Currently I create a texture, and use lock, unlock to copy the color, then display. Is there a better way to do that? I am thinking using the background of CDUXTDialog, but can not control the color freely. Anyone can give me better suggestions? Also, since it is a static colorbar, I don't want to update it every frame, where should I rend it? InitApp()? OnCreateDevice()? OnResetDevice()? Thank you very much!

Share this post


Link to post
Share on other sites
Advertisement
If it is truly static, i.e., you only create it once and it's not modified, creation speed doesn't really matter much. You can either create it as an image in Photoshop, or programmatically. If you create it in the managed pool, it'd be handled automatically during a reset, so you only need to create it once. I don't remember the DXUT structure without checking, so can't say if InitApp or OnCreateDevice is the right place, but I'm sure that looking at a sample would show were resources are created.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!