Jump to content
  • Advertisement
Sign in to follow this  
eal

smooth color transition with d3d

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

i've been learning d3d, so my first program is a triangle that moves around and changes colors: http://members.aol.com/ealang12345/triangle.zip and the source: http://members.aol.com/ealang12345/triangle_source.zip the only thing i'm wondering, is there a way to make the colors of the triangle blend together more smoothly? it also seems like it runs pretty slowly considering the program is unrestricted in terms of speed.

Share this post


Link to post
Share on other sites
Advertisement
I'm not sure so this is a random suggestion.

These lines look suspect:
D3DDISPLAYMODE mode ;
D3D8OBJ->EnumAdapterModes ( D3DADAPTER_DEFAULT , 0 , &mode ) ;

You haven't initialised the 'mode' variable, and D3DADAPTER_DEFAULT isn't listed in my docs as being an acceptable parameter to EnumAdapterModes. Try replacing it with 'D3DFMT_A8R8G8B8' for 32bpp or 'D3DFMT_A1R5G5B5' for 15bpp.

Share this post


Link to post
Share on other sites
Ah thanks, it looks awesome now. I can't believe the guy who wrote the book I'm studying didn't do that.

[Edited by - eal on August 2, 2005 11:37:16 PM]

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!