Results 1 to 7 of 7

Thread: how to keep textures in video card's memory?

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2010
    Posts
    13

    how to keep textures in video card's memory?

    since when i use glTexture2D with client memory pointer, it seems it stores texture in system memory.
    maybe i should use buffers to load texture into video card's memory?

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: how to keep textures in video card's memory?

    it seems it stores texture in system memory
    And makes you think this is the case ?

    Typically the GL driver will keep a "backup" copy of the texture in system memory, but it will also be copied to the GPU. Unless you get short on video ram, in this case the texture may be deleted from GPU to free some space. Whenever it is needed again, the driver will re-upload the texture from sys mem to vid mem automatically.

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2010
    Posts
    13

    Re: how to keep textures in video card's memory?

    got the idea, but any way to get 'video-ram-only' storage?
    i like memory device context in windows that allows to keep buffers in video card memory,
    dunno if it does always but i was lucky to store big bitmaps without any system memory consumption.

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: how to keep textures in video card's memory?

    No.
    Just be sure to delete the buffer on your application side as soon you did the glTexImage, at least this avoids a third copy.

    Do you have a case for this ? Like a constrained system ram and large unused video ram ?

  5. #5
    Junior Member Newbie
    Join Date
    Jan 2010
    Posts
    13

    Re: how to keep textures in video card's memory?

    no constrains, i'd just like to have smaller memory consumption.
    so i guess buffer objects also have system memory copies?

  6. #6
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: how to keep textures in video card's memory?

    Yes. When you map the buffer, you application is given a pointer to the driver controlled buffer, this is interesting for regularly updating a texture:
    Instead of having to keep the third copy on your side, to resupply the updated texture, you just update the driver one, which then update the gpu once you unmap it.

    Explanations here :
    http://www.songho.ca/opengl/gl_pbo.html#map

  7. #7
    Junior Member Newbie
    Join Date
    Jan 2010
    Posts
    13

    Re: how to keep textures in video card's memory?

    thanx, man

Similar Threads

  1. How to query the video card memory?
    By Cornix in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 10-15-2013, 06:02 PM
  2. Video Card Memory Management
    By JRGlide in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 02-08-2010, 06:21 AM
  3. Video Card Memory Size
    By BD in forum OpenGL: User Software
    Replies: 3
    Last Post: 04-13-2004, 12:21 AM
  4. Query Video Card Info (Video Memory size?)
    By macbearchen in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-17-2003, 02:12 AM
  5. More RAM than video card memory...
    By TheDD in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 05-14-2001, 05:20 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