Results 1 to 6 of 6

Thread: displaying .bmp files

  1. #1
    Junior Member Newbie
    Join Date
    May 2000
    Location
    Pittsburgh, PA,USA
    Posts
    14

    displaying .bmp files

    I am trying to write a simple program that displays .bmp images in a window. Does anyone have any or know where I could find any sample code for an application like this?

  2. #2
    Junior Member Newbie
    Join Date
    May 2000
    Location
    Pittsburgh, PA,USA
    Posts
    14

    Re: displaying .bmp files

    By the way, I have been trying to use the glDrawPixels command. Is this the best command to use for what I am trying to do?

  3. #3
    Member Contributor
    Join Date
    May 2000
    Posts
    72

    Re: displaying .bmp files

    only use glDrawPixels if you don't care about speed. Otherwise you should draw a textured quad.

  4. #4
    Junior Member Newbie
    Join Date
    Jun 2000
    Posts
    3

    Re: displaying .bmp files

    Hi jgrashow - if you're writing the app for OpenGL try using the glaux library. The function auxDIBImageLoad loads a BMP up for you. You can then use the data it returns to create a GL texture. Go see http://nehe.gamedev.net/opengl.asp and take a look at the texture mapping demo - Lots of good GL code examples here.

  5. #5
    Senior Member OpenGL Guru Humus's Avatar
    Join Date
    Mar 2000
    Location
    Stockholm, Sweden
    Posts
    2,342

    Re: displaying .bmp files

    I wouldn't recommend using the aux libraries, they are obolete and buggy.

  6. #6
    Member Contributor
    Join Date
    May 2000
    Posts
    72

    Re: displaying .bmp files

    The best texture lib I've found is glPNG http://www.wyatt100.freeserve.co.uk/download.htm
    It will do the dirty work for you, but it'll also just load a file and give you the raw data if you want. And .png is a VERY flexible format...

Similar Threads

  1. Displaying dae files in openGL
    By brainydexter in forum COLLADA
    Replies: 22
    Last Post: 11-06-2009, 06:12 AM
  2. Displaying dae files in openGL
    By brainydexter in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-03-2009, 10:32 AM
  3. Displaying Image Files using Texture mapping
    By ZBetty in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 06-03-2008, 03:34 AM
  4. reading and displaying .PPM files
    By ammir in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-02-2001, 10:46 AM
  5. displaying bitmaps in 2d(or raw files)
    By Starnut coder in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 01-28-2001, 01:36 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