Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

SetGammaRamp problems

4: Adsense

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   

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.

#2 blaze   Members   

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   

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   

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.