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 3 of 3

Thread: save greater-than-one float in texture!!solved!!!!

  1. #1
    Intern Contributor
    Join Date
    Jun 2011
    Posts
    82

    save greater-than-one float in texture!!solved!!!!

    I saved some values in a matrix, and want to use the matrix to initialize a texture.

    Some of the values in the matrix are greater than one, and they are all in floating format.

    The texture is generated using the following code:
    Code :
    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, imageWidth,
    imageHeight, 0, GL_RGBA, GL_FLOAT, myMatrix);

    However, when I use gDEBugger to check the value saved in the texture, only to find that all values are less than one. Why? How to solve this problem?


  2. #2
    Member Regular Contributor
    Join Date
    Oct 2010
    Location
    France
    Posts
    466

    Re: save greater-than-one float value in texture

    Try RGBA32F as internal format (or RGBA32F_ARB)

  3. #3
    Intern Contributor
    Join Date
    Jun 2011
    Posts
    82

    Re: save greater-than-one float value in texture

    Thank you very much. It is correct now.

Posting Permissions

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