Class: resdata

resdata holds all resources that are supposedly static, like models, textures, and are often reused, as those use different memory than the dynamic nodes that are normally created.
ResData is sepearted in ResourceChunks. The user specifies how many chunks he wants and how big those should be, ie how many resources of each type they can hold and how much memory they preallocate.
Resources are then loaded into the current active chunk, because of the linear memorypool they cannot be destroyed individually but only a total chunk can be destroyed.
A lot can go wrong when consumers of resource, that were in a chunk that was cleared, are still active. So the user should keep resources/consumer managment in unified blocks himself, to prevent this from happening, as he is totally responsible for it. You can always play safe and use only the main chunk that is automatically created.

Overview on the restypes, and their int values:
0 MODEL
1 ANIMATION
2 TEXTURE
3 MATERIAL
4 SHADER
5 GPUPROG
6 PARTICLECLOUD
7 PARTICLESYS
8 TBTERRAIN
10 SOUND

Methods:

Method overview:


fillonlyself ()
returns: ()
when the active reschunk is full, resources will not be created. (default)
filltonext ()
returns: ()
when the active reschunk is full, we will load the resource in the next one, and make that active.
getloadcount (int restype)
returns: (int)
returns number of loaded resources.
getopencount (int restype)
returns: (int)
returns number of open slots available for this resource type. Useful for generating reschunks.
gettypescount ()
returns: (int)
returns number of types that exist. You need to pass this many counts to reschunk new.
info (int restype)
returns: ()
prints info about the given resource type, any resource implements the 'getrestype' function
print ()
returns: ()
prints loaded resources, and reschunks to os console