Jump to content

  • Log In with Google      Sign In   
  • Create Account

SetGammaRamp problems


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 bosjoh   Members   -  Reputation: 122

Like
Likes
Like

Posted 11 January 2000 - 07:09 AM

When I try to use LPDIRECTDRAWGAMMACONTROL::SetGammaRamp the system hangs. Maybe I am not using it right, but that''s because there is little explanation and no samples. I''ve written this piece of code (don''t worry, DDRAW is initialized). { DDGAMMARAMP gdata; LPDIRECTDRAWGAMMACONTROL dgamma; unsigned short rp;//vars for (rp=0;rp<256;rp++){ gdata.red[rp]=0; gdata.green[rp]=0; gdata.blue[rp]=0; }; dgamma->SetGammaRamp(DDSGR_CALIBRATE,&gdata); };//just a sample Maybe someone knows more about this method.

Sponsor:

#2 blaze   Members   -  Reputation: 122

Like
Likes
Like

Posted 11 January 2000 - 01:38 PM

Make sure your video card supports gamma ramp changing in DirectX. Monster3D IIs (VoodooII) don't. Also, some don't support calibration. What video card are you using?

BTW, are you initializing your dgamma variable and creating an IDirectDrawGammaControl interface?

--Shannon Schlomer, BLAZE Technologies, Inc.

Edited by - blaze on 1/11/00 7:43:18 PM

#3 bosjoh   Members   -  Reputation: 122

Like
Likes
Like

Posted 11 January 2000 - 05:41 PM

I am using an S3 virge 375/385 videocard. But the system shouldn''t hang, the function is supposed to return an error then.
That''s why I think, I did something wrong, or I forgot something. The sample in the original post is the only part that has to do with the gamma control. The rest (not seen), is only creating directdraw surfaces and setting the screenmode to 800x600x16.

#4 blaze   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 January 2000 - 02:55 AM

You need something like this, where g_lpFront is a pointer
to the primary surface.

LPDIRECTDRAWGAMMACONTROL dgamma;
if(g_lpFront->QueryInterface(IID_IDirectDrawGammaControl, (LPVOID*)&dgamma) != S_OK)
{
dgamma = 0;
}

if(dgamma)
{
// CODE HERE FOR SETTING THE GAMMA RAMP
}

If you''ve done this, I don''t see why it hangs.

--Shannon Schlomer, BLAZE Technologies, Inc.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS