Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 9 of 9

Thread: sRGB and Multi-Sampled Textures

Hybrid View

  1. #1
    Junior Member Newbie Kastenfrosch2's Avatar
    Join Date
    May 2012
    Location
    Germany
    Posts
    15

    sRGB and Multi-Sampled Textures

    On a NVidia Card the following works fine, while on an ATI card i get an GL_INVALID_ENUM because of the GL_SRGB8_ALPHA8.

    Code :
    glBindTexture(GL_TEXTURE_2D_MULTISAMPLE,texMS);
    glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, 2 ,GL_SRGB8_ALPHA8, windowWidth, windowHeight,true);

    (I have an 4.2-Comptibility Context and i am using freeglut and glew)


    In the 4.2 Documentation it is said, that glTexImage2DMultisample only accepts color-renderable formats and GL_SRGB is not listed as color-renderable.

    So is it true, that i can't have a multisampled sRGB texture?

    If so:
    Why is it said in the GL_EXT_FRAMEBUFFER_sRGB documentation, that
    ... if the color samples for multisampling are sRGB encoded ...
    If not so:
    Did i misread the specification?

  2. #2

  3. #3
    Junior Member Newbie Kastenfrosch2's Avatar
    Join Date
    May 2012
    Location
    Germany
    Posts
    15
    It was a "Mobility HD 5850" and i just noticed, that it only supports OpenGL 3.2. (But Freeglut did complain when i requested a 4.2 context).
    But if i request a 3.2 Context, the error is the same.

    I also tried it with a HD6750M with 3.2 Context (of a Samsung SUR40, that for some reason doesn't allow me to update the windows-7-provided drivers), which yields the same error.

    Does that clarify things?
    Where can i read what context supports which internal formats?

  4. #4
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    It was a "Mobility HD 5850" and i just noticed, that it only supports OpenGL 3.2.
    Then it sounds like your drivers are very out of date. Being a laptop card, updating the drivers will probably be non-trivial, but you should do that.

  5. #5
    Junior Member Newbie Kastenfrosch2's Avatar
    Join Date
    May 2012
    Location
    Germany
    Posts
    15
    I misinterpreted the information on the ATI product page stating
    OpenGL 3.2 support
    that it would be the maximum supported version, i am sorry for this.

    Anyhow the drivers are up-to-date and when i start the GL Extension Viewer it tells me that OpenGL 4.2 is supported (explains why freeglut did not complain about the 4.2 context). But no matter which context i set, GL_SRGB8_ALPHA8 yields the error.

    Could you in general tell me if it SHOULD be supported and where i could have found this information.

  6. #6
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    The spec says that the internal format must be color-renderable. Which effectively means "no compressed formats".

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •