Twin Gamma Ramp Problem (!) et al... (DX8.0)

Started by
2 comments, last by flareman 21 years, 5 months ago
Okay, here goes: I decided to use the gamma ramp fetures of dx8, so I create a D3DGAMMARAMP structure, blank it out, GetGammaRamp the current ramp settings, then do some modifications and SetGammaRamp it. The result? 1) (Problem #1In windowed mode: NOTHING. Null, not even the slightest modification, even though the sdk notes contradict, saying that the ramp settings can be used both in f/s mode AND in a window! 2) (Problem #2In full-screen mode: OK, this is even crazier; NO OUTPUT AT ALL! In windowed mode, there is the rendered flare, normally, only the ramp doesn't take effect; in full-screen mode, the output goes totally blank (black)! Just ton avoid misunderstandings, here are two details I noticed: a> The ramp is set normally in any case (I cleared the structure and Got it later on to find out that it is truly set). b> The blank screen problen (#2) kicks in no matter the new ramp settings. Here's what I did to check it out: I got the normal ramp settings from the device and then re-Set the unmodified. The result is the blank screen again!(#$%@!). BTW, my GeForce2MX400 can't calibrate (no caps2 bit set), but the problem seems to be quite irrelevant. What is going wrong? Any ideas? Actually I want to use this feature for color-tinting, FF6 style, as well as for black-and-white scenes. Now, about this latter one, now that I think more carefully of it, I can't see how a gamma ramp can turn the output to grayscale. Any ideas on THAT? Any help appreciated Flare -----------<<>>----------- Ga1adaN, Primus ante Adein flareman@freemail.gr -----------<<>>------------ [edited by - Flareman on November 1, 2002 4:48:26 PM]
-----------<<>>-----------Flareman (a.k.a Ga1adaN)Primus ante Adain[email=flareman@freemail.gr]flareman@freemail.gr[/email]-----------<<>>------------
Advertisement
And, by the way, I just remembered: anyone knows a way to draw variable-width lines w/ dx8.0?
-----------<<>>-----------Flareman (a.k.a Ga1adaN)Primus ante Adain[email=flareman@freemail.gr]flareman@freemail.gr[/email]-----------<<>>------------
I too have seen strange behavior with the gamma ramp. Specificly, I used GetGammaRamp and then immediately called SetGammaRamp with the data I just got and the screen went black. The following fix seemed to set the gamma values back to what SetGammaRamp is expecting.

pd3dDevice->GetGammaRamp( &defaultRamp );
for( i = 0; i < 256; i++ )
{
defaultRamp.red *= 256;
defaultRamp.green *= 256;<br> defaultRamp.blue *= 256;<br>}<br>pd3dDevice->SetGammaRamp( D3DSGR_CALIBRATE, &defaultRamp );<br><br>Hope that helps. </i>
Good news are, the tinting works in full-screen. Bad news are, it still doesn''t work in windowed mode. Anybody got a clue?

Also, about those B&W scenes... any suggestions?

-----------<<>>-----------
Ga1adaN, Primus ante Adein
flareman@freemail.gr
-----------<<>>------------
-----------<<>>-----------Flareman (a.k.a Ga1adaN)Primus ante Adain[email=flareman@freemail.gr]flareman@freemail.gr[/email]-----------<<>>------------

This topic is closed to new replies.

Advertisement