Results 1 to 8 of 8

Thread: [Q] Where is the loaded texture data stored ??

  1. #1
    Member Contributor
    Join Date
    Apr 2010
    Posts
    53

    [Q] Where is the loaded texture data stored ??

    After loading texture, (or give an id to texture data..)

    where is that rgb data of loaded texture stored ?

    in the memory of graphic device, or system memory ?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Oct 2001
    Location
    Princeton, NJ
    Posts
    380

    Re: [Q] Where is the loaded texture data stored ??

    As far as I know its up to your driver. That is, you can't know and you cannot control it. I believe you can give the implementation hints as to which textures are more important, but the driver makes the final call

  3. #3
    Member Contributor
    Join Date
    Apr 2010
    Posts
    53

    Re: [Q] Where is the loaded texture data stored ??

    So, It depends on graphic device driver... ( Am I right ?)

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jun 2002
    Location
    Philadelphia, PA, US
    Posts
    108

    Re: [Q] Where is the loaded texture data stored ??

    yup, for general texture usage, it's up to the drivers. you can provide suggestions to the driver with the glPrioritizeTextures() function.

    according to the red book, you can determine if a texture is resident on the graphics card (stored in the texture cache) with the glGetTexParameter*v() or the glAreTexturesResident() functions.

  5. #5
    Member Contributor
    Join Date
    Apr 2010
    Posts
    53

    Re: [Q] Where is the loaded texture data stored ??

    Thanks for your help .

  6. #6
    Senior Member Regular Contributor
    Join Date
    May 2002
    Location
    York, UK
    Posts
    128

    Re: [Q] Where is the loaded texture data stored ??

    FYI:

    If you are on a Silicon Graphics O2 textures are stored in normal memory.

    So the amount of textures you can have resident depends on the amount of main memory you have available.

    e.g. I have a realtime application whereby
    40 Mb of textures are pre-loaded.

    Rob.

  7. #7
    Senior Member Regular Contributor
    Join Date
    Apr 2002
    Location
    St. Louis, MO USA
    Posts
    177

    Re: [Q] Where is the loaded texture data stored ??

    Correct me if I'm wrong, but the data is ALWAYS stored in system memory and it is sometimes transferred to the video memory. This is done transparently by OpenGL with texture objects. In any case, you have to keep the texture in system memory, because that is where OpenGl gets it from if it has been bumped out of video memory.

  8. #8
    Senior Member Regular Contributor
    Join Date
    May 2002
    Location
    York, UK
    Posts
    128

    Re: [Q] Where is the loaded texture data stored ??

    Hi, I believe the sequence would go something like this.

    1. You load (or create) image data into main memory.

    2. You then use OpenGL calls to create a texture using this data.

    3. You free the data you loaded (usually)

    4. You bind the texture to GL objects (i.e. the same texture can be applied to many objects if required)

    5. Where the actual "texture" is held depends on your OpenGL implementation (or "driver").

    In many cases the texture IS stored in memory on the graphics card.

    On the SGI O2, texture memory is allocated from main memory - no "special" video memory etc to worry about. So you don't need to ask the questions like, "how many textures can I preload onto my graphics card" etc ... if you run out of texture memory, add more memory to your system!

    Similarly, you allocate video buffers, audio buffers and so on, ALSO in main memory. A different beast from a PC.

    Rob.

Similar Threads

  1. Skybox (Cubemap) - Only first loaded image is stored in texture buffer
    By imported_Silverlan in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 11-05-2013, 02:24 PM
  2. How is data stored in GL_DEPTH_COMPONENT24 texture?
    By CelticDaddio in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 07-20-2006, 02:36 AM
  3. How is data stored in GL_DEPTH_COMPONENT24 texture?
    By CelticDaddio in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 07-18-2006, 04:28 PM
  4. when is texture data loaded into texture memory
    By guoxusheng in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 02-12-2004, 04:49 AM
  5. Where is the texture data stored
    By BK in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 10-17-2000, 03:49 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