Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How to check video memory statistics?  (Read 2012 times)

0 Members and 1 Guest are viewing this topic.

mkalex777

  • Full Member
  • ***
  • Posts: 206
    • View Profile
How to check video memory statistics?
« on: November 09, 2015, 04:34:29 am »
I need to load a lot of different images, so I want to get some kind of video memory statistics to implement some cache which will unload unused images. I need to know when available amount of video memory is too low.
So, is there any way to get total available video memory and used video memory?

dabbertorres

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • website/blog
Re: How to check video memory statistics?
« Reply #1 on: November 09, 2015, 05:26:30 am »
Either OpenGL vendor extensions or OS system functions. There is no standard.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: How to check video memory statistics?
« Reply #2 on: November 09, 2015, 09:39:51 am »
Leave it to OpenGL. If you want to, provide the user some texture preset (like low, medium, high). You don't have to manually unload/reload textures, they'll be cached anyway, and in case the graphics card runs out of memory, the driver will unload unused textures and reupload them in case they're used again.

 

anything