Results 1 to 10 of 10

Thread: 16 bit bitmaps as texutres

  1. #1
    Guest

    16 bit bitmaps as texutres

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

  2. #2
    Guest

    Re: 16 bit bitmaps as texutres

    gluBuild2dMipmaps doesnt accept the 16 bit pixel format tokens. read the spec on it:
    http://msdn.microsoft.com/library/de...fnc01_406r.asp

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

    in conjunction with auto-mipmap generation
    http://oss.sgi.com/projects/ogl-samp...ate_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/de...fnc01_406r.asp

  3. #3
    Guest

    Re: 16 bit bitmaps as texutres

    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.

  4. #4
    Senior Member Frequent Contributor
    Join Date
    Apr 2004
    Posts
    990

  5. #5
    Guest

    Re: 16 bit bitmaps as texutres

    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?

  6. #6
    Senior Member Frequent Contributor
    Join Date
    Apr 2004
    Posts
    990

    Re: 16 bit bitmaps as texutres

    Read this documentation

    http://developer.nvidia.com/object/t...on_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

  7. #7
    Guest

    Re: 16 bit bitmaps as texutres

    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/de...entid=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.

  8. #8
    Guest

    Re: 16 bit bitmaps as texutres

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

  9. #9
    Guest

    Re: 16 bit bitmaps as texutres

    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)

  10. #10
    Guest

    Re: 16 bit bitmaps as texutres

    Unfortunately questioning continues... 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.

Similar Threads

  1. bitmaps
    By chign in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-04-2010, 05:11 AM
  2. Bitmaps
    By Azazel in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 03-15-2004, 05:31 AM
  3. 32 and 16-bit Bitmaps
    By Fernando in forum OpenGL: Advanced Coding
    Replies: 15
    Last Post: 06-28-2002, 01:46 PM
  4. help with bitmaps
    By jono_123 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-23-2002, 12:12 AM
  5. bitmaps
    By Bra'Tac in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-03-2001, 07:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean