Results 1 to 4 of 4

Thread: Interpreting GL_MAX_TEXTURE_SIZE

  1. #1
    Member Contributor
    Join Date
    Feb 2000
    Posts
    89

    Interpreting GL_MAX_TEXTURE_SIZE

    When I call glGetIntegerv(GL_MAX_TEXTURE_SIZE, float*) I get a valuue of 2048. Does this mean my maximum texture size is 2048x2048? (the card is a 3dlabs VX1).
    What will happen if I try a larger texture size? (I suppose I should just try it and find out. I assume I get an error.)

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    France
    Posts
    880

    Re: Interpreting GL_MAX_TEXTURE_SIZE

    You're right on both points !

    Your card can handle textures up to 2048x2048 and if you try higher, you should get an error (via glGetError).

    Eric

  3. #3
    Member Contributor
    Join Date
    Feb 2000
    Posts
    89

    Re: Interpreting GL_MAX_TEXTURE_SIZE

    Follow-up question:
    I did a little math on this and it looks to me that this 2048x2048 max texture size equals about 16 MB. This is probably dictated by the amount of texture memory available on the card (makes sense). So does this mean that if I want to avoid loading textures onto the card (after initially defining them of course), I should keep the combined size of all my textures below this 16MB size? i.e. I should try not to use more than 1 2048x2048 texture, or 4 1024x1024 textures, or 16 256x256 textures, etc. or some combination that keeps me below this 16 MB limit?

    When I use glBindTexture() to make an existing texture active, if it is already resident in memory on the card, I assume that there is no significant performance hit (as compared to if I'm using more than the available texture memory on the card).

    Thanks for any insight.

    [This message has been edited by Rob (edited 04-07-2000).]

  4. #4
    Senior Member OpenGL Guru Humus's Avatar
    Join Date
    Mar 2000
    Location
    Stockholm, Sweden
    Posts
    2,342

    Re: Interpreting GL_MAX_TEXTURE_SIZE

    Yes, you're right ... changing active texture doesn't give any significant performance hit if it is resident in graphic memory. However, a little commment about your calculations ... you must also consider that the frame buffer and Z/stencil buffer and so on takes a lot of space too. 800x600x32 dubble buffered with 32 bit Z buffer takes 5.5MB mem. 1024x768 will be 9MB mem ...
    So, to minimize AGP trafic you may want to use 16 bit textures, which will double the amount of textures you can use. Using 16 bit textures doesn't give the same reduced graphic quality as using 16 bit frame buffer.
    It is also important to know that a little trafic over the AGP bus isn't much of a trouble either, for example moving a couple of textures over the bus once every frame. I've done a little app that creates and updates two textures dynamically every frame ... and it runs without any problems, i guess it would even if i updated like 10 texture every frame too. But of course, if you want max speed you should try to keep your textures small enough to fit in memory.

Similar Threads

  1. interpreting matrix transform
    By subflood in forum OpenGL: General
    Replies: 3
    Last Post: 12-10-2011, 02:50 PM
  2. Interpreting rotation animations
    By Luke1410 in forum COLLADA
    Replies: 6
    Last Post: 02-17-2009, 09:59 PM
  3. Interpreting a Wavefront Obj...
    By tester in forum OpenGL: Basic Coding
    Replies: 25
    Last Post: 05-20-2006, 01:20 PM
  4. Problem interpreting depth values
    By knackered in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 03-11-2005, 06:49 AM
  5. GL_MAX_TEXTURE_SIZE
    By mithun_daa in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 01-14-2004, 02:15 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