Results 1 to 4 of 4

Thread: HELP !!! URGENT !!!

  1. #1
    Member Newbie
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    35

    HELP !!! URGENT !!!

    I have a tough problem ((
    i found out how to get a pointer to the pixel data of a bmp file !! and how to get the info about size etc.!!
    The problem ?
    i can use the data for an texture BUT red changes to blue, blue changes to red and green is the only color that is not changed. I have read in a book about windows programming that the internal order of an RGB image is rather BGR.
    Now i have opengl 1.1 and therefore the GL_BGR format option isn`t available ! How can i solve this problem ??

  2. #2
    Member Newbie
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    35

    Re: HELP !!! URGENT !!!

    By accident i have found a code line in some tutorial program that contained the symbolic constant GL_BGR_EXT. Now my program works.This was not mentioned in the RED BOOK. Maybe it is part of the 'extension system' ?? How do i find out what else might be supported, but not mentioned in the RED BOOK ?

    Sincerely,
    Martin.

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: HELP !!! URGENT !!!

    GL_BGR_EXT is an extension that Windows default software implementation of OpenGL even supports. To get a list of extensions that your card supports, you can use glGetString(GL_EXTENSIONS); To get information on those extensions, you can check the extension registry. There is a link to the extension registry somewhere on this site. I couldn't tell you where exactly it is offhand, though.
    Deiussum
    Software Engineer and OpenGL enthusiast

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: HELP !!! URGENT !!!

    Another option is the switch from the BMP file format to TGA for you textures.
    Easy to read file format, lot's of examples of loading TGA's and a format not owned by Micro$oft.




    Originally posted by Tresher:
    I have a tough problem ((
    i found out how to get a pointer to the pixel data of a bmp file !! and how to get the info about size etc.!!
    The problem ?
    i can use the data for an texture BUT red changes to blue, blue changes to red and green is the only color that is not changed. I have read in a book about windows programming that the internal order of an RGB image is rather BGR.
    Now i have opengl 1.1 and therefore the GL_BGR format option isn`t available ! How can i solve this problem ??

Similar Threads

  1. Help me pls...very urgent...thanks very much...
    By scorpio79 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-07-2005, 07:58 PM
  2. URGENT, Help
    By alvin in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-23-2003, 08:12 PM
  3. URGENT, Help
    By alvin in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 01-23-2003, 12:56 AM
  4. URGENT, Help
    By alvin in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 01-22-2003, 06:32 PM
  5. Urgent!!
    By link19 in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 07-27-2001, 04:04 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