Jump to content
  • Advertisement
Sign in to follow this  

OpenGL transparency and color modulation without modifying vertex data (OpenGL style)

This topic is 4119 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 folks, my background is in OpenGL and I'm new to DirectX. I'm having a little bit of trouble figuring out the right way to do color and alpha modulation in DirectX. The issue is that I want to change the alpha (and potentially color modulation) of large geometries without having to make the changes on a per-vertex basis. In fact, I would like to avoid having color at all in my vertex data. In OpenGL, I can just call glColor*(), but I don't see any clear analog in DirectX. I do see the possibility of using D3DTA_CONSTANT along with a D3DTOP_MODULATE texture operator, but I haven't been able to get this to work. Furthermore, the documentation says that D3DTA_CONSTANT isn't always supported. From searching around, it doesn't seem like D3DTA_CONSTANT is widely used. So is there some way to change the color or transparency for a large geometry without changing all of the vertex data? Will D3DTA_CONSTANT do the trick, and if it will, is it reasonable to expect that it will be available on most machines? Thanks!

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!