• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

# Gama Control in DirectDraw..

## Recommended Posts

I recently discovered the LPDIRECTDRAWGAMMACONTROL Interface, it looks like just the thing I need as I want to employ a day/night effect in my game. However I noticed that it only has hardware support. So I need to know, how many video cards actually support these functions? do most of them, or only a small minority? Becuase it would play quite a large part in my game and I dont want people to miss out becuase of their video card. Also how fast is it? If it''s acessing the hardware I guess its pretty fast right? -thanks

##### Share on other sites
I''m not sure exactly how many video cards don''t support it, but I''d say it''s probably a small number, older video cards. As for the speed, it is very fast. Much faster than any fading routines that you could write.

"We are the music makers, and we are the dreamers of the dreams."
- Willy Wonka

##### Share on other sites
So what your saying is that most video cards support it apart from a few older ones?

Thats good, and its good about the speed as well, the fading routine I wrote was rather slow, even in assembler.

##### Share on other sites
You could implement two versions of your day/night routines: one that uses Gamma and one that that is your own software version. Call GetCaps from your ddraw object (it takes a DDCAPS pointer as an argument). After the call, check the ddcaps.dwCaps2 member. If DDCAPS2_PRIMARYGAMMA is present, then the hardware supports the gamma control and you can use the accelerated version of your routine:

  DDCAPS ddcaps;lpdd->GetCaps (&ddcaps);if (ddcaps.dwCaps2 & DDCAPS2_PRIMARYGAMMA){ // use gamma control} else{ // use software version}

Edited by - Aldacron on April 22, 2001 8:16:32 PM

##### Share on other sites
quote:
Original post by gdoz

So what your saying is that most video cards support it apart from a few older ones?

Yeh, don''t quote me on that, but I''m pretty sure it''s mostly older cards that don''t support it.

"We are the music makers, and we are the dreamers of the dreams."
- Willy Wonka

• ## Partner Spotlight

• ### Forum Statistics

• Total Topics
627654
• Total Posts
2978450

• 10
• 12
• 22
• 13
• 33