Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: About number of texture image units

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2008
    Posts
    7

    About number of texture image units

    Hi everyone,

    I'm running Leopard 10.5.5. My application need to use as much texture image units as possible. However, according to information from Apple webpage http://developer.apple.com/graphicsi...ies/index.html , it seems like they "hard-coded" the number of texture image units (MAX_TEXTURE_IMAGE_UNITS_ARB) to 16. Is there any way to overcome this limitation? (I know for sure that my graphics card support 32 texture image units).

    Bests.

  2. #2
    Member Regular Contributor
    Join Date
    Apr 2007
    Posts
    271

    Re: About number of texture image units

    In the link you sent, there is:
    "
    Notes

    * This data describes functionality only. Actual rendering results may differ across renderers with identical reported capabilities; always verify your results on the real hardware.
    "

    So, what do you have for real?

    Also, you'd better check for GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB instead of GL_MAX_TEXTURE_IMAGE_UNITS_ARB.

    Code :
    GLint value;
    glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB,&value);

  3. #3
    Junior Member Newbie
    Join Date
    Dec 2008
    Posts
    7

    Re: About number of texture image units

    Hi,

    I check GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB, GL_MAX_TEXTURE_IMAGE_UNITS, and GL_MAX_TEXTURE_IMAGE_UNITS_ARB. The results are the same: 16. I'm using the Geforce 8800GT 512MB. From this website (http://www.gpureview.com/GeForce-8800-GT-card-544.html), this card is listed to have 56 (64) texture units. I managed to install Gentoo Linux and use the Nvidia driver 177.80 on this machine and run the same OpenGL code, I have the results of 32. This is quite strange to me since Mac OS support OpenGL from inside out (if I'm not wrong). Do you have any suggestion?

    Bests.

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Dec 2001
    Location
    Wellington, New Zealand
    Posts
    548

    Re: About number of texture image units


  5. #5
    Member Regular Contributor
    Join Date
    Apr 2006
    Location
    Irvine CA
    Posts
    300

    Re: About number of texture image units

    We ran into this too. The advertised limit is what you can get to with fixed function texturing. I think you can get to more if you are all-shader.

  6. #6
    Member Regular Contributor
    Join Date
    Apr 2007
    Posts
    271

    Re: About number of texture image units

    Rob, you are talking about GL_MAX_TEXTURE_UNITS which is fixed function only.

    cvision is talking about GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS and GL_MAX_TEXTURE_IMAGE_UNITS which are all-shader.

  7. #7
    Advanced Member Frequent Contributor arekkusu's Avatar
    Join Date
    Nov 2003
    Posts
    676

    Re: About number of texture image units

    The current driver limit really is 16, although the hardware can support 32. Please file a bug, like OneSadCookie suggested.

    As for image units past 32, I don't know about gpureview.com, but how do you propose binding an image? There are no GL enums defined past GL_TEXTURE31, so there is no way for you to bind a texture or set the sampler uniform to >31.

    Also, if you don't mind my asking-- what are you doing that needs more than 16 units?



  8. #8
    Junior Member Newbie
    Join Date
    Dec 2008
    Posts
    7

    Re: About number of texture image units

    I need to visualize multi volume so that the number of texture units can help a lot. Maybe I should wait for couple of months then try again with Mac.

  9. #9
    Advanced Member Frequent Contributor arekkusu's Avatar
    Join Date
    Nov 2003
    Posts
    676

    Re: About number of texture image units

    Do you mind expanding on that a little bit?

    Traditional volume visualization is usually done with 3D textures. Do you actually have more than 16 textures you need to sample from for a single fragment?

  10. #10
    Junior Member Newbie
    Join Date
    Dec 2008
    Posts
    7

    Re: About number of texture image units

    Yeah, I think you're right. However, there are cases when you implement your own shading model (in my case, the number of textures that are used to produce the light map is higher than 16). That's the reason why I need the full support for the number of texture units from the card. Recently, I'm running the framework on Linux and it needs more than 16 texture units to handle the task (maybe I should modify it to be more efficiently with the required number of texture units).

Posting Permissions

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