16 bit bitmaps as texutres

iz it possible and what parameters should I pass to gluBuild2dMipmaps? Thanks.

gluBuild2dMipmaps doesnt accept the 16 bit pixel format tokens. read the spec on it:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/glufnc01_406r.asp

you could use one of the compressed formats (some of which are 16 bit)
http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture_compression_s3tc.txt

in conjunction with auto-mipmap generation
http://oss.sgi.com/projects/ogl-sample/registry/SGIS/generate_mipmap.txt

otherwise, just convert your image data to one of the accepted pixel formats (pretty darn easy, but a slight pain in the butt):
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/glufnc01_406r.asp

10x for answering me. Could you give an example of using compressed textures. I searched the net for tutorials or demos but I couldn’t find. If you have any links or sample sources I would beg you for posting them.

http://developer.nvidia.com/object/OpenGL_S3TC_tutorial.html

Thanks Nico I checked the link and it really works but is it linux portable? GCC gives DDSURFACEDESC2 undeclared. I know that the problem comes from the fact that I don’t have direct X under linux. Any suggestions or .DDS format is windows specific?

Read this documentation

http://developer.nvidia.com/object/texture_compression_OpenGL.html

They use a utility from the directx sdk to compress cube maps with mipmaps into a single dds file. You can most likely write your own function in linux for that.

Nico

unfortunately, this isnt a trivial task, nor is it a joyous one.

heres another demo that loads a dds (skip down a bit in the list):
http://www.codesampler.com/oglsrc.htm

i havnt tried it, but it looks ok. the only caveat is the need to include ddraw.h for the DDSURFACEDESC2 definition. you can try to create this structure yourself from the docs (MSDN):
http://msdn.microsoft.com/library/default.asp?url=/nhp/default.asp?contentid=28000410

or, just download the monster sdk (~230 megs):
http://www.microsoft.com/downloads/detai…&displaylang=en

this took me 14 hours with my “tin cans connected by a string” connection.

rats, heres the link to the structures (sigh):
http://www.microsoft.com/downloads/detai…&displaylang=en

well, on the other hand, there’s the link to the structures:
http://msdn.microsoft.com/library/en-us/…asp?frame=true

(head is extra boney today)

Unfortunately questioning continues… :frowning: All went very well till the moment I found that DRI drivers for Ati Radeon Mobility 7500 from dri.sf.net does not support the S3TC extension, nor any other TC extension. In fact how many TC extensions are there? I know only for the S3 and FX extensions.

Why RLE compressed TGAs aren’t supported for real time decoding? I might be wrong but from what I have read and what I have seen, makes me think that it is true. I have never read somebody saying it is not possible but all TGA loaders I’ve found in the net first decompress and then pass image data to the GL functions.As a final approach I am thinking about adding the S3TC extension to the ICD but for doing it right I need some open source video driver which supports it(I know that’s not an easy task but go prove I’m not wrong to the project manager…). Thanks once again.