DGA Question

“Real” gamma correction is like this, AFAIK (where ^ is used for
exponentation):

destColor = (origColor)^(1/gamma)
this should be gamma, not 1/gamma.

It is normally performed as a lookup table per channel in hardware.

njhOn Mon, 19 Oct 1998, Chuck Homic wrote:

Nope, you understand just fine. I stand corrected, which is pretty
embarrassing considering I’m currently doing research in monitor
calibration :slight_smile: (mental note to self to stop posting on 3 hours sleep…)

:slight_smile: me too… had to look it up to quash me fears… :slight_smile:

njhOn Mon, 19 Oct 1998, Benjamin Lewis wrote:

Nope, you understand just fine. I stand corrected, which is pretty
embarrassing considering I’m currently doing research in monitor
calibration :slight_smile: (mental note to self to stop posting on 3 hours sleep…)

:slight_smile: me too… had to look it up to quash me fears… :slight_smile:

Hehe… I was going to send the infamous "I’m-right-you-stupid-fools"
flame, but I figured I’d hold off for a while. I guess that worked out
for the better. :slight_smile: However, whoever said it depends on what you want to
do is even more right…

-ChuckOn Tue, 20 Oct 1998, Nathan Hurst wrote:

On Mon, 19 Oct 1998, Benjamin Lewis wrote:

Hi!

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

I wasn’t able to check e-mail for a week so this post is a little late…
My colors were very dark, too when I was porting my game from
DOS/8bit to SDL with palette. That’s when I noticed that the usual
DAC on the VGA card uses bits 0…5 (values 0…63) and SDL uses
all 8 bits (values 0…255). I’m now left-shifting each palette byte by
2 bits before setting the palette.

I just thought that might be your problem

Paulus Esterhazy (@Paulus_Esterhazy)

Hi!

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 ?

I wasn’t able to check e-mail for a week so this post is a little late…
My colors were very dark, too when I was porting my game from
DOS/8bit to SDL with palette. That’s when I noticed that the usual
DAC on the VGA card uses bits 0…5 (values 0…63) and SDL uses
all 8 bits (values 0…255). I’m now left-shifting each palette byte by
2 bits before setting the palette.

Yes!! This is exactly it. Thank You!! I was doing gamma correction which
was generally quite good but not exactly the same, had a little bit of fade to
it. this is it. quite cool.

/devOn 25-Oct-98 Paulus Esterhazy 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.

Hey,

I got an email from someone who is trying to get a game I ported over to SDL
working on his system, and had a runtime problem. He’s got an S3 ViRGE DX/2mb
running 16 bpp with xfree (XF86_S3V) v3.3.1 on slackware 3.1

The prob is that when the program gets to the SDL_Init(SDL_INIT_VIDEO) call it
dies with :

XIO: fatal IO error 0 (Success) on X server ":0.0"
after 0 requests (0 known processed) with 0 events remaining.

I never returns from the SDL_Init call.

thanx for any input,
/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 the first woodpecker that
// | came along would destroy civilization.

The prob is that when the program gets to the SDL_Init(SDL_INIT_VIDEO) call it
dies with :

XIO: fatal IO error 0 (Success) on X server ":0.0"
after 0 requests (0 known processed) with 0 events remaining.

The only time I’ve seen this with SDL 0.7+ was on a system linked with a
bad version of pthreads. What version of libc or pthreads is he using?

See ya!
-Sam Lantinga (slouken at devolution.com)–
Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/

David Vandewalle wrote:

Hey,

I got an email from someone who is trying to get a game I ported over to SDL
working on his system, and had a runtime problem. He’s got an S3 ViRGE DX/2mb
running 16 bpp with xfree (XF86_S3V) v3.3.1 on slackware 3.1

The prob is that when the program gets to the SDL_Init(SDL_INIT_VIDEO) call it
dies with :

XIO: fatal IO error 0 (Success) on X server ":0.0"
after 0 requests (0 known processed) with 0 events remaining.

I never returns from the SDL_Init call.

thanx for any input,
/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 the first woodpecker that
// | came along would destroy civilization.

I’ve got an S3 Virge DX 4mb, and I read someplace that it’s better to use the
XF86_SVGA server for it, tho that shouldn’t be causing that much harm…
-Erik

Erik Reid wrote:

David Vandewalle wrote:

Hey,

I got an email from someone who is trying to get a game I ported over to SDL
working on his system, and had a runtime problem. He’s got an S3 ViRGE DX/2mb
running 16 bpp with xfree (XF86_S3V) v3.3.1 on slackware 3.1

The prob is that when the program gets to the SDL_Init(SDL_INIT_VIDEO) call it
dies with :

XIO: fatal IO error 0 (Success) on X server ":0.0"
after 0 requests (0 known processed) with 0 events remaining.

I never returns from the SDL_Init call.

thanx for any input,
/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 the first woodpecker that
// | came along would destroy civilization.

I’ve got an S3 Virge DX 4mb, and I read someplace that it’s better to use the
XF86_SVGA server for it, tho that shouldn’t be causing that much harm…
-Erik

I’m using XF86_S3V on a an S3 Virge DX 4mb and it works fine, excepted when
I launch SDL 8 bpp program in 32bpp the screen looks strange, like a non-mode X
graphics on a modeX
display under DOS. In 8 bpp, it is fine, and fast.

Good luck–
Stephane Magnenat
stephane.magnenat at urbanet.ch

Sam Lantinga wrote:

I’m using XF86_S3V on a an S3 Virge DX 4mb and it works fine, excepted when
I launch SDL 8 bpp program in 32bpp the screen looks strange, like a non-mode X
graphics on a modeX display under DOS.

Can you send me a screenshot of this?

Thanks!

I can’t grab an SDL windows in ful screen, can I ?

Stephane Magnenat
stephane.magnenat at urbanet.ch

The prob is that when the program gets to the SDL_Init(SDL_INIT_VIDEO) call
it
dies with :

XIO: fatal IO error 0 (Success) on X server ":0.0"
after 0 requests (0 known processed) with 0 events remaining.

The only time I’ve seen this with SDL 0.7+ was on a system linked with a
bad version of pthreads. What version of libc or pthreads is he using?

Following up on this -> versions are as follows:

libc 5.4.31, linuxthreads-0.71 or from RH4.2 (can’t see a version -
it’sat home).

/devOn 18-Nov-98 Sam Lantinga 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 the first woodpecker that
// | came along would destroy civilization.

Following up on this -> versions are as follows:

libc 5.4.31, linuxthreads-0.71 or from RH4.2 (can’t see a version -
it’sat home).

This is too old for pthreads to work.
What’s the output of “make spotless; make; make” in the SDL directory?
Please reply to me privately.

See ya!
-Sam Lantinga (slouken at devolution.com)–
Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/