Results 1 to 4 of 4

Thread: Red and Blue texture switch

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2002
    Location
    Florida
    Posts
    15

    Red and Blue texture switch

    Hello, I finally got my textures working, and ran into a problem . The graphic artist I'm working with walked by and said that I switched the red and the blue around! Well, I thought it should be a really simple matter telling OpenGL that I want it to read it in that order instead...but the documentation does not appear to match reality . I am currently using the format parameter GL_RGB, which is documented on Pg. 95 of the GL API documentation from this site. Also on that page is a format called "GL_BGR". My compiler accepts the first and rejects the latter. Why?! Any suggestions? Or do I have to figure out how to read the texture and switch the red bits with the blue bits during read-time?
    The great pop-tart GAWD of Mt. Kellogs

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

    Re: Red and Blue texture switch

    Try using GL_BGR_EXT.
    Deiussum
    Software Engineer and OpenGL enthusiast

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2002
    Location
    Florida
    Posts
    15

    Re: Red and Blue texture switch

    Yeah, that fixed it. Thanks! Is there any place that has the correct formats listed so I can reference that instead of the other thing I was using?
    The great pop-tart GAWD of Mt. Kellogs

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

    Re: Red and Blue texture switch

    You could check MSDN for info like that. Or there's always the old stand-by of checking the headers as well.

    You were probably looking at docs for 1.2 or higher, and the headers and library for Windows is 1.1. In order to get 1.2 functions, etc. you can also find glext.h (nvidia.com has it somewhere) and use wglGetProcAddress to get funcion pointers to the 1.2+ functions.
    Deiussum
    Software Engineer and OpenGL enthusiast

Similar Threads

  1. Performance question: Switch shaders, or use empty texture
    By eldritch972 in forum OpenGL: Advanced Coding
    Replies: 8
    Last Post: 11-06-2017, 11:31 AM
  2. Switch between texture filtering modes
    By Thomas Alton in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-13-2009, 01:38 PM
  3. No more blue :(
    By Plato in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 11-26-2002, 03:23 PM
  4. Texture from resource gets blue...
    By NOAH IV in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-11-2002, 05:41 AM
  5. Loading BMP`s. Red turn Blue, Blue turns Red! Help!
    By Anonymous Coward in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 08-13-2000, 02:11 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