Results 1 to 4 of 4

Thread: OpenGL extension for bitmaps

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    carol stream,IL usa
    Posts
    21

    OpenGL extension for bitmaps

    Since I started programming in OpenGL, I've been converting bitmap files into a format that's compatible with OpenGL.

    I was wondering what the OpenGL extension is that allows you to use Windows Bitmap files without converting them into another format. I would also appreciate any examples, since I'm not familiar with how extensions work.

    Thanks.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Dec 2007
    Posts
    1,077

    Re: OpenGL extension for bitmaps

    I wouldn't know of any extension which would do that (at least if you have 24-bits bmp, you can use GL_BGR_EXT). You can however use the DIB functions to get a compatible format.
    I do paletted textures by hand...

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Dec 2007
    Posts
    1,077

    Re: OpenGL extension for bitmaps

    Of course, by hand, means that the loading routine converts it!

  4. #4
    Guest

    Re: OpenGL extension for bitmaps

    glaux has a bitmap handling util
    #include <GL/glaux.h>
    ....


    AUX_RGBImageRec *Image = NULL;
    Image=auxDIBImageLoad(file);
    ...
    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, Image->sizeX, Image->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, Image->data);

    works for me and remember to add the glaux.lib if your using vc++. I'm not sure if the glaux is windows specific, don't think it is but not sure. Don't know the limitation of auxDIBImageLoad either, it's been working fine for me so far. Only been using 24bit images though.

Similar Threads

  1. Bitmaps in OpenGL?
    By billy in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 04-16-2002, 01:50 AM
  2. OpenGL and Bitmaps
    By in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 08-12-2001, 05:20 AM
  3. Upside down bitmaps in OpenGL
    By jhurley in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 06-20-2001, 09:28 PM
  4. fonts as Bitmaps in OpenGL on Mac
    By in forum OpenGL: macOS
    Replies: 1
    Last Post: 04-13-2001, 10:28 AM
  5. Use of Bitmaps in OpenGL
    By HanoBotha in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-09-2001, 05:03 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