void TextureMan::AddTexture( const char * const inAssetName, const TextureName inName )
{
	GLuint textureID;
	GLuint *pTextureID = &textureID;

	// get instance
	TextureMan *pTextMan = TextureMan::privGetInstance();

	// load texture to gpu, get ID from gpu
	pTextMan->privLoadTexture( inAssetName, pTextureID );

	// make a new node, set its values
	TextureNode *pNode = new TextureNode();
	pNode->set( inAssetName, inName, textureID, GL_LINEAR, GL_LINEAR, GL_CLAMP_TO_EDGE );

	// add said node to front of active texture list
	pTextMan->privAddToFront( pNode, pTextMan->active );
}
Ejemplo n.º 2
0
void TextureMan::addTexture( const char * const _assetName, const TextureName _name)
{
	GLuint               textureID;
	GLuint *pTextureID = &textureID;

	// Get the instance to the manager
	TextureMan *pTextMan = TextureMan::privGetInstance();

	// Load the texture and get the textureID
	pTextMan->privLoadTexture( _assetName, pTextureID );

	// Create a TextureNode
	TextureNode *pNode = new TextureNode();

	// initialize it
	pNode->set( _assetName, _name, textureID, GL_LINEAR, GL_LINEAR, GL_CLAMP_TO_EDGE);

	// Now add it to the manager
	pTextMan->privAddToFront( pNode, pTextMan->active );
}