How do I enable fullscreen DGA, do I need to set a environment
variable?. (I am using RH-5.0).
sdldoom -fullscreen
You’ll need to run it as root to get the fullscreen mode.
Note that there’s a bug in it which will soon be fixed – the screen
shifts when you use the mouse. Dunno why.
Is anybody already working on Joystick support for the linux version?
Yes. Joystick support is planned and will be implemented soon.
(~3 weeks)
Is this the right place to ask this kind of questions.?
Maybe you need the -grabmouse option?
Ciao
-MicheleOn Sat, Oct 17, 1998 at 10:57:58PM -0700, Sam Lantinga wrote:
How do I enable fullscreen DGA, do I need to set a environment
variable?. (I am using RH-5.0).
sdldoom -fullscreen
You’ll need to run it as root to get the fullscreen mode.
Note that there’s a bug in it which will soon be fixed – the screen
shifts when you use the mouse. Dunno why.
I just finished porting Sabre from svgalib to X11 with SDL. The only catch is
all of the colors are really, really dark. Is there some kind of gamma
correction or an easy way up my color brighness ?
thanx,
/dev—
// David E. Vandewalle |Weinberg’s Law: If builders built
// vandewal at skyblue.com | buildings the way programmers wrote
// david.e.vandewalle at lmco.com | programs, then thefirst woodpecker that
// | came along would destroy civilization.
I just finished porting Sabre from svgalib to X11 with SDL. The only catch is
all of the colors are really, really dark. Is there some kind of gamma
correction or an easy way up my color brighness ?
Very cool.
The fast way I know to do this is:
for entry in palette
do entry.r += amount
entry.g += amount
entry.b += amount
done
I don’t know how this looks since I’ve just saved my palette out as an xpm
image (don’t ask me how) and used XV to tweak the gamma.
I just finished porting Sabre from svgalib to X11 with SDL. The only catch is
all of the colors are really, really dark. Is there some kind of gamma
correction or an easy way up my color brighness ?
Very cool.
The fast way I know to do this is:
for entry in palette
do entry.r += amount
entry.g += amount
entry.b += amount
done
I don’t know how this looks since I’ve just saved my palette out as an xpm
image (don’t ask me how) and used XV to tweak the gamma.
wouldn’t this only work on colormapped displays? ie, it wouldn’t work
with TrueColor visuals?On Sun, 18 Oct 1998, Sam Lantinga wrote:
wouldn’t this only work on colormapped displays? ie, it wouldn’t work
with TrueColor visuals?
Why wouldn’t it?
Because colormaps don’t work / are irrelevant with TrueColor and
DirectColor visuals. If you try installing a colormap into a TrueColor
display, it doesn’t work, and usually gives an X error.On Mon, 19 Oct 1998, Nathan Hurst wrote:
Because colormaps don’t work / are irrelevant with TrueColor and
DirectColor visuals. If you try installing a colormap into a TrueColor
display, it doesn’t work, and usually gives an X error.
Yes, but couldn’t you apply these changes to every pixel? (of course, on
real hardware one could just change the gamma table… %sigh%)
Cool. works quite well. Now if someone can just tell me how to read from the
palette for a surface, I can removes some ugly hacks and will be a very happy
guy.
/devOn 19-Oct-98 Sam Lantinga wrote:
The fast way I know to do this is:
for entry in palette
do entry.r += amount
entry.g += amount
entry.b += amount
done
// David E. Vandewalle |Weinberg’s Law: If builders built
// vandewal at skyblue.com | buildings the way programmers wrote
// david.e.vandewalle at lmco.com | programs, then thefirst woodpecker that
// | came along would destroy civilization.
For RGB I would have thought that
for entry in palette
do entry.r *= 0.99
entry.g *= 0.99
entry.b *= 0.99
done
would like nicer?
Actually, to increase the gamma,
for entry in palette
do entry.r *= 1.1
entry.g *= 1.1
entry.b *= 1.1
done
Would probably be better, although you’d have to watch for overflow.
(The same is true for my code:
for entry in palette
do for element in R G B
do value = (float)entry.element *= 1.1
if ( value > 255 )
entry.element = 255
else
entry.element = value
fi
done
done
Note that I have no idea of the real gamma correction algorithm.
This just makes colors arbitrarily brighter.
Cool. works quite well. Now if someone can just tell me how to read from the
palette for a surface, I can removes some ugly hacks and will be a very happy
guy.
This is easy, just read the entries in surface->format->palette->colors[]
For example the RGB values of the 0’th element of the surface colormap is:
SDL_Palette *palette = surface->format->palette;
You need to check to make sure the surface has a palette (isn’t in Truecolor)
with the following code, or reading the palette will cause a segmentation fault
in your code:
for entry in palette
do entry.r *= 1.1
entry.g *= 1.1
entry.b *= 1.1
done
[snip]
Note that I have no idea of the real gamma correction algorithm.
This just makes colors arbitrarily brighter.
“Real” gamma correction is like this, AFAIK (where ^ is used for
exponentation):
destColor = (origColor)^(1/gamma)
assuming your colors are floats 0.0-1.0. If they’re on the scale of 255,
then you have to scale them to 1.0 first:
destColor = ((origColor/255)^(1/gamma))*255
Just do this for each of red, green, and blue. This is better than
just multiplying the color because 0^x=0 and 1^x=1 (for any x), so you
don’t have to clamp the values. (Clamping looks ugly.)
“Real” gamma correction is like this, AFAIK (where ^ is used for
exponentation):
destColor = (origColor)^(1/gamma)
assuming your colors are floats 0.0-1.0. If they’re on the scale of 255,
then you have to scale them to 1.0 first:
destColor = ((origColor/255)^(1/gamma))*255
Just do this for each of red, green, and blue. This is better than
just multiplying the color because 0^x=0 and 1^x=1 (for any x), so you
don’t have to clamp the values. (Clamping looks ugly.)
I believe you should replace 1/gamma by gamma in the above. The value of
gamma is around 2 to 2.5 for most monitors. The equation you have given is
essentially what the monitor does, so you need to take the reciprocal to
undo it.
This is also assuming your images are linear to begin with; if not, you’d
probably do
Congratulations! You have purchased an extremely fine device that would
give you thousands of years of trouble-free service, except that you
undoubtably will destroy it via some typical bonehead consumer maneuver.
Which is why we ask you to PLEASE FOR GOD’S SAKE READ THIS OWNER’S MANUAL
CAREFULLY BEFORE YOU UNPACK THE DEVICE. YOU ALREADY UNPACKED IT, DIDN’T
YOU? YOU UNPACKED IT AND PLUGGED IT IN AND TURNED IT ON AND FIDDLED WITH
THE KNOBS, AND NOW YOUR CHILD, THE SAME CHILD WHO ONCE SHOVED A POLISH
SAUSAGE INTO YOUR VIDEOCASSETTE RECORDER AND SET IT ON “FAST FORWARD”, THIS
CHILD ALSO IS FIDDLING WITH THE KNOBS, RIGHT? AND YOU’RE JUST NOW STARTING
TO READ THE INSTRUCTIONS, RIGHT??? WE MIGHT AS WELL JUST BREAK THESE
DEVICES RIGHT AT THE FACTORY BEFORE WE SHIP THEM OUT, YOU KNOW THAT?
– Dave Barry, “Read This First!”
I believe you should replace 1/gamma by gamma in the above. The value of
gamma is around 2 to 2.5 for most monitors. The equation you have given is
essentially what the monitor does, so you need to take the reciprocal to
undo it.
Nope. I ran both formulas through the infamous TI-85 and the 1/gamma formula
brightens the pixel, and the other one dims it. (Unless I don’t understand
something, which is quite possible on a monday.)
Congratulations! You have purchased an extremely fine device that would
give you thousands of years of trouble-free service, except that you
undoubtably will destroy it via some typical bonehead consumer maneuver.
Which is why we ask you to PLEASE FOR GOD’S SAKE READ THIS OWNER’S MANUAL
CAREFULLY BEFORE YOU UNPACK THE DEVICE. YOU ALREADY UNPACKED IT, DIDN’T
YOU? YOU UNPACKED IT AND PLUGGED IT IN AND TURNED IT ON AND FIDDLED WITH
THE KNOBS, AND NOW YOUR CHILD, THE SAME CHILD WHO ONCE SHOVED A POLISH
SAUSAGE INTO YOUR VIDEOCASSETTE RECORDER AND SET IT ON “FAST FORWARD”, THIS
CHILD ALSO IS FIDDLING WITH THE KNOBS, RIGHT? AND YOU’RE JUST NOW STARTING
TO READ THE INSTRUCTIONS, RIGHT??? WE MIGHT AS WELL JUST BREAK THESE
DEVICES RIGHT AT THE FACTORY BEFORE WE SHIP THEM OUT, YOU KNOW THAT?
– Dave Barry, “Read This First!”
^^ This is really, really cool!
/devOn 19-Oct-98 Benjamin Lewis wrote:
// David E. Vandewalle |Weinberg’s Law: If builders built
// vandewal at skyblue.com | buildings the way programmers wrote
// david.e.vandewalle at lmco.com | programs, then thefirst woodpecker that
// | came along would destroy civilization.
I believe you should replace 1/gamma by gamma in the above. The value of
gamma is around 2 to 2.5 for most monitors. The equation you have given is
essentially what the monitor does, so you need to take the reciprocal to
undo it.
Nope. I ran both formulas through the infamous TI-85 and the 1/gamma formula
brightens the pixel, and the other one dims it. (Unless I don’t understand
something, which is quite possible on a monday.)
Nope, you understand just fine. I stand corrected, which is pretty
embarrassing considering I’m currently doing research in monitor
calibration (mental note to self to stop posting on 3 hours sleep…)