Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 1 and Version 2 of ~archive/ResourceManager


Ignore:
Timestamp:
Nov 28, 2007, 12:14:28 AM (16 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • ~archive/ResourceManager

    v1 v2  
    55For this Orxonox provides a Shared Resource System for these time-consuming processes.
    66
    7  1. Resources that are loaded (like a Texture) always have a Data-type (like TextureData) where the data is stored.
     7 1. Resources that are loaded (like a Texture) always have a Data-type (like !TextureData) where the data is stored.
    88 2. The Resources have a counted pointer to these Data, so if you copy one Texture to another one, only the pointer will be copied, and the reference-count of the pointer will be automatically increased
    9  3. To Finaly load a Resource from disc, and keep a constant version of the Data in check, the Resource functionality is finally used: for the Resource Texture the coresponding Resourcerer is ResourceTexture.
     9 3. To Finaly load a Resource from disc, and keep a constant version of the Data in check, the Resource functionality is finally used: for the Resource Texture the coresponding Resourcerer is [wiki:archive/ResourceTexture ResourceTexture].
    1010   Resources do:
    1111   * locate Files on the disc in a Directoy of your joice
    12    * store a copy of a ResourceData with a Key-Name.
     12   * store a copy of a !ResourceData with a Key-Name.
    1313
    14 In the following document ResourceTexture is only assumed as an Example. This also works with ResourceMD2, ResourceOBJ, ResourceSoundBuffer and so on.
     14In the following document [wiki:archive/ResourceTexture ResourceTexture] is only assumed as an Example. This also works with ResourceMD2, ResourceOBJ, !ResourceSoundBuffer and so on.
    1515== Usage Example ==
    1616  * Share a Resource (assumes texutre has some data assigned to it):
     
    2222}}}
    2323Here you can see, that copy has _NO_ pointer type, so we can copy one Texture to another one, and both textures share the same data.
    24   * Load a Texture from the disc with ResourceTexture
     24  * Load a Texture from the disc with [wiki:archive/ResourceTexture ResourceTexture]
    2525{{{
    2626#!cpp
     
    3131  Texture storeTex = ResourceTexture("orxonox.png", GL_TEXTURE_2D);
    3232}}}
    33 As you can see Texture is loaded over ResourceTexture, the data loaded in Resource Texture is assigned as easy from Texture to storeTex as from any other Texture (since ResourceTexture isA Texture :) ).
     33As you can see Texture is loaded over [wiki:archive/ResourceTexture ResourceTexture], the data loaded in Resource Texture is assigned as easy from Texture to storeTex as from any other Texture (since [wiki:archive/ResourceTexture ResourceTexture] isA Texture :) ).
    3434
    3535== Behind the scenes ==
    36 ResourceTexture is a Handler that is derived from Texture and Resource.
     36[wiki:archive/ResourceTexture ResourceTexture] is a Handler that is derived from Texture and Resource.
    3737  * The Texture part sais, how to load a Texture from a disc.
    3838  * The Resource part sais, where the Resource can be found, and to check if the Resource was already loaded