Represents a standard RenderWare Texture map.
Textures reference Rasters (RwRaster), which contain the actual texture and, if applicable, any mip-map data. The texture object is therefore an extension of the basic raster object and some functionality is split across the two APIs because of this. For instance, mip-map functions are found under RwRaster, not RwTexture.
Textures rely on the RwImage object to load bitmaps from standard image file formats such as .BMP, .RAS and .PNG.
|
RwTextureCallBack represents the function called from RwTexDictionaryForAllTextures for all textures in a given texture dictionary. This function should return the current texture to indicate success. The callback may return NULL to terminate further callbacks on the texture dictionary.
|
|
RwTextureCallBackFind represents the function used by RwTextureRead to search for a texture in memory before attempting to read one from disk. This may involve searching previously loaded texture dictionaries.
|
|
RwTextureCallBackMipmapGeneration is the callback function supplied to RwTextureSetMipmapGenerationCallBack and returned from RwTextureGetMipmapGenerationCallBack. The supplied function will be passed a pointer to a raster and an image. The raster is the target for the generated mipmap levels and the image provides the base for their generation.
|
|
RwTextureCallBackMipmapName is the callback function supplied to RwTextureSetMipmapNameCallBack and returned from RwTextureGetMipmapNameCallBack. The supplied function will be passed a pointer to a root name, a maskName, a mipmap level and a format. The function returns TRUE if successful and the root name will have been modified to equal the mipmap name.
|
|
RwTextureCallBackRead represents the function used by RwTextureRead to read the specified texture from a disk file. This function should return a pointer to the texture to indicate success.
|
|
RwPalQuantGetMaxDepth returns the maximum depth of the tree used for palette quantization.
|
|
RwPalQuantSetMaxDepth sets the maximum depth of the tree used for palette quantization. The deeper the tree, the more memory and time will be used by the quantization process, but the better the results. Values should be less than 8.
|
|
RwTexDictionarySetFreeListCreateParams allows the developer to specify how many RwTexDictionary s to preallocate space for. Call before RwEngineOpen.
|
|
RwTextureAddRef is used to increment the reference count of the specified texture. Use this function to indicate that a new object depends on the texture's existence. This ensures that the texture is not lost when other objects that use this texture are destroyed.
|
|
RwTextureCreate is used to create a new texture from the specified raster. The raster must have been created with type flag rwRASTERTYPETEXTURE or rwRASTERTYPECAMERATEXTURE to be used as a texture and to be of a size and depth compatible with the particular device it is created for. If the texture is added to a texture dictionary it is recommended that the texture be given a name so that it can be identified when the dictionary is searched. On creation the texture has a reference count of one.
|
|
RwTextureDestroy is used to destroy the specified texture. If the texture is defined in a texture dictionary the texture is removed from that dictionary. The raster associated with the texture is also destroyed by this function.
|
|
RwTextureGenerateMipmapName is used to generate the name of a mipmap level file. It is possible to supply a user defined procedure for naming mipmap levels. The API function RwTextureSetMipmapNameCallBack should be used before reading of textures.
|
|
RwTextureGetAddressing is used to retrieve the current texture-addressing mode of the specified texture. The texture-addressing mode determines how the UV coordinates are used to generate the texel color.
|
|
RwTextureGetAddressingU is used to retrieve the current texture-addressing mode of the specified texture. The texture-addressing mode determines how the UV coordinates are used to generate the texel color.
|
|
RwTextureGetAddressingV is used to retrieve the current texture-addressing mode of the specified texture. The texture-addressing mode determines how the UV coordinates are used to generate the texel color.
|
|
RwTextureGetAutoMipmapping is used to enquire whether mipmaps are automatically generated when reading a texture or also read in from separate files. The default setting is FALSE, i.e. the mipmaps will be read in also. This setting is only used if mipmaps are available.
|
|
RwTextureGetDictionary is used to determine the texture dictionary that the specified texture belongs to.
|
|
RwTextureGetFilterMode is used to retrieve the current texture-filtering mode of the specified texture.
|
|
RwTextureGetFindCallBack is used to enquire which function is currently used by RwTextureRead to search for textures in memory before an attempt is made to read them from an image file on disk.
|
|
RwTextureGetMaskName is used to retrieve the mask name of the specified texture. The mask name is usually only defined if the texture has been created by reading an image file from disk together with a mask image file. Otherwise, the mask name is an empty string.
|
|
RwTextureGetMipmapGenerationCallBack This function is called at texture read time if mipmaps are available and are to be automatically generated.
|
|
RwTextureGetMipmapNameCallBack queries the function currently used to generate names for mip level files for textures.
|
|
RwTextureGetMipmapping is used to enquire whether mipmaps will be available when reading textures. The default setting is FALSE, i.e. mipmaps are not available.
|
|
RwTextureGetName is used to retrieve the name of the specified texture. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RwTextureGetPluginOffset is used to get the offset of a previously registered plugin.
|
|
RwTextureGetRaster is used to retrieve the raster associated with the specified texture.
|
|
RwTextureGetReadCallBack is used to enquire which function is currently used for reading textures from image files.
|
|
RwTextureRasterGenerateMipmaps is used to generate mipmaps for a raster, either from the supplied image (all mip levels including 0 are generated), or from mip level 0 of the raster into the remaining mip levels (no image supplied). The mipmaps are generated by the default callback function or a user supplied callback.
|
|
RwTextureRead is used to read a texture from the specified image file on disk. A second image may also be read containing a mask to be applied to the first image after they have been read from the file system. If the mask is not required NULL should be passed as the mask image file name. The strings supplied for the texture names must form the leaf part (i.e. without path or extension) of the pathname for the texture file. For portability it is best to choose texture file names that are a maximum of 8 characters long and which are acceptable to MS-DOS as file names. The rest of the pathname of the texture file is obtained from the current search path; if the search path is not set it is assumed that the texture resides in the same directory as the application executable. New format modules can be added using RwImageRegisterImageFormat. It is also possible to specify a user defined procedure for loading textures from image files of other formats. The API function RwTextureSetReadCallBack is used for this purpose and should be used before calling RwTextureRead. A texture may have already been loaded and may be in a texture dictionary. Therefore, before the texture file is read from disk, a search is first made. By default, the current texture dictionary is searched for a texture of the same name, or if the current dictionary is not defined, all textures dictionaries are searched. This behavior may be overridden by a user defined callback set with RwTextureSetFindCallBack. Only if the texture has not been found in memory is the disk file actually read. Therefore different textures must have different names. When a new texture has been successfully loaded it is added to the current texture dictionary, if one is defined.
|
|
RwTextureRegisterPlugin is used to register a plugin and reserve some space within a texture. This must happen after the engine has been initialized but before the engine is opened.
|
|
RwTextureRegisterPluginStream is used to associate a set of binary stream functionality with a previously registered texture plugin.
|
|
RwTextureSetAddressing is used to specify the texture-addressing mode for the given texture. The texture-addressing mode determines how the UV coordinates are used to generate the texel color. This function set the u & v addressing modes. The same result can be achieved by calling RwTextureSetAddressingU & RwTextureSetAddressingV separately.
|
|
RwTextureSetAddressingU is used to specify the texture-addressing mode for the given texture. The texture-addressing mode determines how the UV coordinates are used to generate the texel color. This function sets the addressing mode used in the u direction. Note that not all platforms support this feature.
|
|
RwTextureSetAddressingV is used to specify the texture-addressing mode for the given texture. The texture-addressing mode determines how the UV coordinates are used to generate the texel color. This function sets the addressing mode used in the v direction. Note that not all platforms support this feature.
|
|
RwTextureSetAutoMipmapping is used to indicate whether mipmaps (if enabled) should have their contents generated automatically whenever a texture is read from a file, or whether the mipmaps should be read from separate files. If reading from separate files the default naming convention is to postfix the texture and mask name with "mn" where n is the index of the mipmap level, i.e. m0, m1, m2 etc. RwTextureSetMipmapNameCallBack can be called to change the way the mipmap names are generated. Use this function to choose between automatically generating mipmaps (TRUE) or reading mipmaps (FALSE). The default setting is FALSE, i.e. the mipmaps will be read. This setting is only used if mipmaps are available.
|
|
RwTextureSetFilterMode is used to specify the texture-filtering mode for the given texture.
|
|
RwTextureSetFindCallBack is used to override the callback that will be used by RwTextureRead to search for a texture in memory before attempting to read one from an image file on disk. The default find function searches the current texture dictionary if one is set, or otherwise searches all texture dictionaries in the system. A user specified callback may implement other types of behavior such as searching a subset of texture dictionaries that are relevant to a particular part of a game.
|
|
RwTextureSetFreeListCreateParams allows the developer to specify how many RwTexture s to preallocate space for. Call before RwEngineOpen.
|
|
RwTextureSetMaskName is used to give the specified texture the given mask name.
|
|
RwTextureSetMipmapGenerationCallBack is used to specify the function to be used to generate mipmaps automatically. This function will be called at texture read time if mipmaps are available and automatic mipmap generation is enabled.
|
|
RwTextureSetMipmapNameCallBack is used to specify the function to be used to generate the names of the files containing mipmap levels. The function will be called with a root name and a given mipmap level at texture load time if mipmaps are available and automatic mipmap generation is disabled, i.e. the texture being loaded has mipmap levels stored.
|
|
RwTextureSetMipmapping is used to indicate whether mipmaps will be available whenever a texture is read from an image file. Use this function to turn-on and turn-off creation of textures with mipmaps. The default setting is FALSE, i.e. textures will be created without mipmaps.
|
|
RwTextureSetName is used to give the specified texture the given name. Textures with names can be searched for in texture dictionaries.
|
|
RwTextureSetRaster is used to specify a raster that will store the pixels of the given texture. To be used as a texture the raster must have been created with either type flag rwRASTERTYPETEXTURE or rwRASTERTYPECAMERATEXTURE and to be of a size and depth compatible with the particular device it is created for.
|
|
RwTextureSetReadCallBack is used to override the function that will be used to read textures from image files. The default texture loading mechanism can be used to read any image formats that have been registered with RwImageRegisterImageFormat.
|
|
RwTextureSetStreamAlwaysCallBack is used to associate a binary stream functionality with a previously registered texture plugin. This callback is called for all plugins after stream data reading has completed.
|
|
RwTextureStreamGetSize is used to determine the size in bytes of the binary representation of the specified texture. This is used in the binary chunk header to indicate the size of the texture chunk. The size does not include the size of the chunk header.
|
|
RwTextureStreamRead is used to read a texture from the specified binary stream. Prior to this function call a binary texture chunk must have been found in the stream. The sequence to locate and read a texture from a binary stream connected to a disk file is as follows: RwStream *stream; RwTexture *newTexture; stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "mybinary.xxx"); if( stream ) { if( RwStreamFindChunk(stream, rwID_TEXTURE, NULL, NULL) ) { newTexture = RwTextureStreamRead(stream); } RwStreamClose(stream, NULL); }
|
|
RwTextureStreamWrite is used to write the specified texture to the given binary stream. The stream must have been opened prior to this function call.
|
|
RwTextureValidatePlugins is used to validate the plugin memory allocated within the specified texture. This function is useful for determining where memory trampling may be occurring within an application. This function only returns a meaningful response under a debug library.
|
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |