OpenGL 8Bit palleted Texture

Hello

i want to use 8Bit Pallated Texture in OpenGL.
My intention is to get a 8bit PCX file in a 8 bit openGL texture.
( i dont want to convert the pcx image to a 16bit or 24bit image)

I hope your guys can help

Vardar Sahin wrote:

Hello

i want to use 8Bit Pallated Texture in OpenGL.
My intention is to get a 8bit PCX file in a 8 bit openGL texture.
( i dont want to convert the pcx image to a 16bit or 24bit image)

I hope your guys can help

Depending on the hardware you target, there are multiple ways ot achieve
this :

  • using the paletted texture opengl extension :
    http://oss.sgi.com/projects/ogl-sample/registry/EXT/paletted_texture.txt
    that one is supported from the first geforces IIRC, and up to geforce FX
    5x00 cards

  • using some kind of pixel shader and a lookup table holding the
    palette. That will work on more recent cards (you can get sufficient
    pixel shader support for this from geforce 3 I think). This is also the
    only way on ATI hardware.

Stephane

Hello !

i want to use 8Bit Pallated Texture in OpenGL. My intention is to get a
8bit PCX file in a 8 bit openGL texture.
( i dont want to convert the pcx image to a 16bit or 24bit image)

What is the reason that you want to use 8 Bit Textures ?

CU

Torsten Giebl wrote:

Hello !

i want to use 8Bit Pallated Texture in OpenGL. My intention is to get a
8bit PCX file in a 8 bit openGL texture.
( i dont want to convert the pcx image to a 16bit or 24bit image)

What is the reason that you want to use 8 Bit Textures ?

If you have 8 bit data originally, it’s useless to store it as 32bit in
graphics memory (which is what happens when you don’t do anything about
it). So you actually :

  • save video ram
  • save video bandwidth
    So that can result in nice speedups.

Stephane

Are you sure about this? Recently I noticed Mesa supports paletted
textures, even though GL_EXT_paletted_texture wasn’t listed,
surprisingly. I’m guessing it could be true on some hardware
implementations too.On 4/11/06, Stephane Marchesin <stephane.marchesin at wanadoo.fr> wrote:

  • using the paletted texture opengl extension :
    http://oss.sgi.com/projects/ogl-sample/registry/EXT/paletted_texture.txt
    that one is supported from the first geforces IIRC, and up to geforce FX
    5x00 cards

  • using some kind of pixel shader and a lookup table holding the
    palette. That will work on more recent cards (you can get sufficient
    pixel shader support for this from geforce 3 I think). This is also the
    only way on ATI hardware.

  • SR

Simon Roby wrote:>On 4/11/06, Stephane Marchesin <@Stephane_Marchesin> wrote:

  • using the paletted texture opengl extension :
    http://oss.sgi.com/projects/ogl-sample/registry/EXT/paletted_texture.txt
    that one is supported from the first geforces IIRC, and up to geforce FX
    5x00 cards

  • using some kind of pixel shader and a lookup table holding the
    palette. That will work on more recent cards (you can get sufficient
    pixel shader support for this from geforce 3 I think). This is also the
    only way on ATI hardware.

Are you sure about this? Recently I noticed Mesa supports paletted
textures, even though GL_EXT_paletted_texture wasn’t listed,
surprisingly. I’m guessing it could be true on some hardware
implementations too.

Go check for yourself :
http://www.delphi3d.net/hardware/extsupport.php?extension=GL_EXT_paletted_texture

Mesa’s support is software-only anyway, it’s a long shot from a hardware
implementation.

Stephane

The reason for using 8bit textures is that i have to handle with 8Bit image
data.
I need it for my project openmugen ( it is a fighting game
http://openmugen.sourceforge.net/main_new.html look at the screenshot
section )

I saw a fighting game ( Guilty Gear XX on PC ) which use 8Bit textures on
D3D so i was thinking it should be possible on OpenGl too.

some fighting chars. have over 1000 images and it would be mess to store
them in true color in the video mem.

Currently i use SDL and the SGE lib to draw them on screen.
I use SGE to rotate and scale them.Maybe some one can optimze SGE ?

Any way i want to provide OpenGL rendering and thats why i need 8 bit
textures.

2006/4/12, Stephane Marchesin <stephane.marchesin at wanadoo.fr>:>

Simon Roby wrote:

On 4/11/06, Stephane Marchesin <stephane.marchesin at wanadoo.fr> wrote:

  • using the paletted texture opengl extension :
    http://oss.sgi.com/projects/ogl-sample/registry/EXT/paletted_texture.txt
    that one is supported from the first geforces IIRC, and up to geforce FX
    5x00 cards

  • using some kind of pixel shader and a lookup table holding the
    palette. That will work on more recent cards (you can get sufficient
    pixel shader support for this from geforce 3 I think). This is also the
    only way on ATI hardware.

Are you sure about this? Recently I noticed Mesa supports paletted
textures, even though GL_EXT_paletted_texture wasn’t listed,
surprisingly. I’m guessing it could be true on some hardware
implementations too.

Go check for yourself :

http://www.delphi3d.net/hardware/extsupport.php?extension=GL_EXT_paletted_texture

Mesa’s support is software-only anyway, it’s a long shot from a hardware
implementation.

Stephane


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hello !

The reason for using 8bit textures is that i have to handle with 8Bit
image data. I need it for my project openmugen ( it is a fighting game
http://openmugen.sourceforge.net/main_new.html look at the screenshot
section )

Woah an Oldschool Fighting game this rocks, only the ads suck.
You should check if Sourceforge allows Ads on their sites.

CU