Changes between Version 12 and Version 13 of UsingResources


Ignore:
Timestamp:
05/24/13 11:43:31 (6 years ago)
Author:
welberge
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UsingResources

    v12 v13  
    4343 
    4444== Resource caching: hmi.util.!ResourcePool == 
    45 The hmi.util.Resource class is fine for loading resources from a resource directory, but does not take care of resource caching. That is, when you load, for instance, some texture image via a Resource object, you might easily load the same texture image several times. Even worse, you might create several different GLTexture objects, all based on the same texture image, resulting in wasting texture memory space of your graphics card. The ResourcePool class has been designed to handle such situations. A ResourcePool object requires you to create a so called “ResourceLoader” object, to be used when some resource has to be actually loaded from a resource file. The ResourcePool will then cache the result, and deliver the cached object the next time that the same 
     45The hmi.util.!Resource class is fine for loading resources from a resource directory, but does not take care of resource caching. That is, when you load, for instance, some texture image via a Resource object, you might easily load the same texture image several times. Even worse, you might create several different GLTexture objects, all based on the same texture image, resulting in wasting texture memory space of your graphics card. The ResourcePool class has been designed to handle such situations. A !ResourcePool object requires you to create a so called “!ResourceLoader” object, to be used when some resource has to be actually loaded from a resource file. The !ResourcePool will then cache the result, and deliver the cached object the next time that the same 
    4646resource is asked for. 
    4747