示例#1
0
// Creates a new texture given the image file into OpenGL
void TextureCtrlr::CreateNewTexture(GLuint textureUnit, const char* textureFilePath, const char* nameInShader)
{
	// Create new texture object
	TextureObject* newTexture = new TextureObject(textureUnit);
	newTexture->SetNameInShader(nameInShader);
	newTexture->LoadTextureFileIntoOpenGL(textureFilePath);

	// Add new texture to the list
	this->allTextures.push_back(newTexture);
}