Elaztek Developer Hub
Blamite Game Engine - blam!  00406.12.10.23.1457.blamite
The core library for the Blamite Game Engine.
Blam::Rendering::Textures Namespace Reference

Namespace containing functions for interacting with textures. More...

Functions

BLAM void BuildTextureFromTag (bitmap *bitmap_tag, std::string tag_path)
 Loads a texture into OGRE from a bitmap tag. More...
 
BLAM Ogre::TextureGpu * GetTextureFromTag (std::string tag_path)
 Retrieves an OGRE texture from a tag path. More...
 
BLAM void ReloadPendingBitmaps ()
 Reloads all bitmaps that are currently pending a reload. More...
 
BLAM Ogre::TextureGpu * LoadTexture2D (std::string id, void *pixel_data, int width, int height, Ogre::PixelFormatGpu format, int bytes_per_line)
 Loads a 2D texture from data in memory. More...
 

Detailed Description

Namespace containing functions for interacting with textures.

Function Documentation

◆ BuildTextureFromTag()

void Blam::Rendering::Textures::BuildTextureFromTag ( bitmap bitmap_tag,
std::string  tag_path 
)

Loads a texture into OGRE from a bitmap tag.

Parameters
bitmap_tag- The bitmap tag to load texture data from.
tag_path- The tag path of the provided bitmap tag.
+ Here is the caller graph for this function:

◆ GetTextureFromTag()

Ogre::TextureGpu * Blam::Rendering::Textures::GetTextureFromTag ( std::string  tag_path)

Retrieves an OGRE texture from a tag path.

Parameters
tag_path- The tag path of the desired texture.
Returns
Pointer to the associated texture, or nullptr if no matching texture was found.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadTexture2D()

Ogre::TextureGpu * Blam::Rendering::Textures::LoadTexture2D ( std::string  id,
void *  pixel_data,
int  width,
int  height,
Ogre::PixelFormatGpu  format,
int  bytes_per_line 
)

Loads a 2D texture from data in memory.

Parameters
id- The ID to assign to the texture once created.
pixel_data- Memory address of the texture's pixel data.
width- The width of the texture, in pixels.
height- The height of the texture, in pixels.
format- The format of the texture.
bytes_per_line- The total number of bytes within each row of pixels within the texture.
Returns
Pointer to the newly loaded texture, or nullptr if the texture could not be loaded.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReloadPendingBitmaps()

void Blam::Rendering::Textures::ReloadPendingBitmaps ( )

Reloads all bitmaps that are currently pending a reload.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: