Palettized OpenGL mode with SDL?

Hi there!

I am trying to use SDL with the OpenGL mode, but with an indexed
(palette) mode instead of 15, 16, 24 or 32 bit depth modes.

Is this possible? I can’t find any info about it in SDL-doc…

/Olof

Hi there!

I am trying to use SDL with the OpenGL mode, but with an indexed
(palette) mode instead of 15, 16, 24 or 32 bit depth modes.

Is this possible? I can’t find any info about it in SDL-doc…

To my knowledge there are /NO/ accelerated cases of paletted OpenGL,
they just don’t exist.

If you can give an example or two I would be somewhat interested,
however I doubt you’ll find much.

Zephaniah E. Hull.On Fri, Jul 18, 2003 at 02:48:37PM +0200, Olof Bjarnason wrote:

/Olof


1024D/E65A7801 Zephaniah E. Hull <@Zephaniah_E_Hull>
92ED 94E4 B1E6 3624 226D 5727 4453 008B E65A 7801
CCs of replies from mailing lists are requested.

“Guns don’t kill people. It’s those damn bullets. Guns just make them
go really really fast.” – Jake Johanson
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20030726/c642a8ec/attachment.pgp

Zephaniah E. Hull: “Re: [SDL] Palettized OpenGL mode with SDL?”…

#On Fri, Jul 18, 2003 at 02:48:37PM +0200, Olof Bjarnason wrote:
#> Hi there!
#>
#> I am trying to use SDL with the OpenGL mode, but with an indexed
#> (palette) mode instead of 15, 16, 24 or 32 bit depth modes.
#>
#> Is this possible? I can’t find any info about it in SDL-doc…#
#To my knowledge there are /NO/ accelerated cases of paletted OpenGL,
#they just don’t exist.

#If you can give an example or two I would be somewhat interested,
#however I doubt you’ll find much.

I tried to set bits-per-pixel to 8 when calling SDL_SetVideoMode,
and using the OpenGL/SDL functionality worked, ie. I was able to blit
a rotating quad with OpenGL, though the colors were not quite
accurate (the quad was only in three not so nice colors, not quite
the colors I specified to OpenGL with glColor).

On the other hand, I haven’t tried to setup the palette colors at all,
so it could be that the palette OpenGL was using at the time was
unfair to my glColor specification.

Anyway, I’ve decided to stick to 32 bit code for now, since it is fast
enough for my needs (I am building a Slicks’n’slide clone in 320x240
mode), even on a PC without a 3d acceleration card.

/Olof

#Zephaniah E. Hull.
#>
#> /Olof

#–

1024D/E65A7801 Zephaniah E. Hull

92ED 94E4 B1E6 3624 226D 5727 4453 008B E65A 7801

CCs of replies from mailing lists are requested.

"Guns don’t kill people. It’s those damn bullets. Guns just make them

go really really fast." – Jake Johanson

I tried to set bits-per-pixel to 8 when calling SDL_SetVideoMode,
and using the OpenGL/SDL functionality worked, ie. I was able to blit
a rotating quad with OpenGL, though the colors were not quite
accurate (the quad was only in three not so nice colors, not quite
the colors I specified to OpenGL with glColor).

In paletted mode (color-index mode in OpenGL lingo), you specify
colors with glIndex*().–
Petri Latvala

Petri Latvala: “Re: [SDL] Palettized OpenGL mode with SDL?” (2003-07-31…

#> I tried to set bits-per-pixel to 8 when calling SDL_SetVideoMode,
#> and using the OpenGL/SDL functionality worked, ie. I was able to blit
#> a rotating quad with OpenGL, though the colors were not quite
#> accurate (the quad was only in three not so nice colors, not quite
#> the colors I specified to OpenGL with glColor).#
#In paletted mode (color-index mode in OpenGL lingo), you specify
#colors with glIndex*().

Thanks! Do you have any experience of this mode, eg. is it usually
supported by opengl drivers or might it be a “maybe” supported?

/Olof

Thanks! Do you have any experience of this mode, eg. is it usually
supported by opengl drivers or might it be a “maybe” supported?

No experience. But I think (note: no reliable knowledge) supporting
color-index mode is required, so at least you’d be able to get a
software-drawn color-index context. Someone else might know better.–
Petri Latvala