Results 1 to 4 of 4

Thread: internal texture formats, color banding

  1. #1
    Senior Member Regular Contributor
    Join Date
    Jan 2003
    Posts
    147

    internal texture formats, color banding

    I have a couple questions:

    Are specific internal texture formats (like GL_RGBA8, not GL_RGBA) dependent on:

    1. the amount of available video memory?
    2. the OpenGL version?
    3. the format of the source texture?
    4. the display settings of your desktop?

    5. Also, is there anyway to query what internal texture format is being used
    after calling glTexImage2D?


    Whenever I specify GL_RGBA8 for my texture creation for an alpha channel,
    I get color banding, which means OpenGL ignored my request and used something
    else.

    But, if I specify a format without an alpha channel, the texture is smooth
    and I don't get color banding.

    I am doing this:
    glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, buffer );


    I thought specifying a specific texture format means OpenGL will use it,
    no matter what, even if I have a crappy card?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jun 2003
    Posts
    177

    Re: internal texture formats, color banding

    1-4: Maybe, or maybe not. The specs say:

    If a sized internal format is specified, the mapping of the R, G, B, A, and
    depth values to texture components is equivalent to the mapping of the corresponding
    base internal formatís components, as specified in table 3.15, and the memory
    allocation per texture component is assigned by the GL to match the allocations
    listed in table 3.16 as closely as possible. (The definition of closely is left up to the
    implementation.
    Implementations are not required to support more than one resolution
    for each base internal format.)
    5. Yep.
    Code :
    glGetIntegerv(GL_TEXTURE_INTERNAL_FORMAT, &fmt);

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jan 2003
    Posts
    147

    Re: internal texture formats, color banding

    Ah, great! I didn't know about GL_TEXTURE_INTERNAL_FORMAT Thanks.

    At least I can find out what that sneaky ******* OpenGL gave me.

    I see it listed under glGetTexLevelParameter.

    [This message has been edited by gator (edited 08-21-2003).]

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jun 2003
    Posts
    177

    Re: internal texture formats, color banding

    Ah right, it is a tex parameter. Sorry.

Similar Threads

  1. [NV304.48] Texture internal formats
    By _blitz in forum OpenGL: Drivers
    Replies: 10
    Last Post: 09-25-2012, 08:28 AM
  2. Supported FBO Texture Internal Formats
    By Rhawk187 in forum OpenGL: Advanced Coding
    Replies: 12
    Last Post: 03-13-2011, 12:26 AM
  3. RGB Internal Texture formats in SC standard
    By Xuzuthor in forum OpenGL SC
    Replies: 3
    Last Post: 04-05-2010, 08:09 AM
  4. NV: supported internal texture formats
    By Hampel in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 09-09-2004, 02:51 AM
  5. internal texture formats & nvidia
    By Lev in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 12-21-2000, 05:45 PM

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