Archived

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

Forcas

Having trouble with D3D 8 Gamma Ramps

Recommended Posts

Okay... so I have this Ramp stucture, D3DGAMMARAMP MyRamp, and after initializing the graphics, I try to fill it with the current ramp, like this:
lp3dd->GetGammaRamp(&MyRamp) 
When I try to replace the current gamma ramp with MyRamp, by doing this:
  lp3dd->SetGammaRamp(D3DSGR_CALIBRATE, &MyRamp);  
The screen blacks out. The only time I modify MyRamp is when I call GetGammaRamp. What could I be doing wrong?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Try leaving out the D3DSGR_CALIBRATE. It doesn''t work on all machines, so you''d have to do all the testing for it first.

Share this post


Link to post
Share on other sites
I don't think GetGammaRamp is working properly for me. When I call GetGammaRamp, and try using the MyRamp.red[x] value, it acts as the value of x. EVEN WHEN x is over 255!!! WHat's going on here? I thought the array was only supposed to have 256 elements.

Edited by - Forcas on December 19, 2001 11:00:41 PM

Share this post


Link to post
Share on other sites