Results 1 to 3 of 3

Thread: deleting only larger mipmap levels from a texture

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2014
    Posts
    4

    deleting only larger mipmap levels from a texture

    I have a program which potentially uses a lot of texture memory.

    For this reason, it only loads the mipmap levels it actually needs, and then can load the larger mipmap levels as they are needed. The problem is how to delete them when they are no longer needed.

    I am currently using glTexImage2D with width and height of 0, and NULL data to free the unused levels. Is this standards compliant? Is there a way to verify this works? Would it be better to use a width and height of 2? Are there other ways to do this?

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,117
    You might like to look at ARB_sparse_texture - although it is not available on all hardware

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2014
    Posts
    4
    It seems the only portable ways to do this have performance penalties.

    I could for example, copy the needed mipmaps I want to keep to a new texture using framebuffers.

    I could manually apply mipmapping. This requires a texture for each mipmap level, and then multi texturing to blend the two needed mipmap levels when rendering.

    Does anyone know of a better alternative? Which of the above is likely a better method in terms of performance?

Similar Threads

  1. Setting individual mipmap levels for a texture storage
    By stimulate in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-20-2017, 09:35 AM
  2. Replies: 2
    Last Post: 09-22-2012, 06:20 PM
  3. Get mipmap levels of a texture?
    By Hollis in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 12-16-2011, 02:49 AM
  4. memory management for mipmap levels
    By Hel in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 06-13-2007, 03:03 AM
  5. Mipmap levels and video memory
    By Ysaneya in forum OpenGL: Advanced Coding
    Replies: 23
    Last Post: 02-13-2004, 04:06 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