BSPNode::WalkNode
{
render node
render children
}
TEXTURE::Switch ( int textID )
{
switch to the texture with textID
}
ENGINE::ENGINE
{
rootNode = new BSPNode;
textureMap = new TEXTURE;
}
So the ENGINE class with create the BSP and also the TEXTURE class but inside rootNode, I would like to use textureMap to switch textures, you get what I am saying?
Thanks
Shawn
BSP's and textures
Here''s my problem. I have a class in my engine that handles everything about the BSP. It creates it, stores it, everything. I have a function in the class called WalkNode. This renders the current node''s splitter and than works down the children list rendering those as well. I just call rootNode->WalkNode (position) and it takes care of it.
I also have a texture management class. It handles loading textures, freeing them, binding them, etc. In the BSPNode::WalkNode class, I would like to switch textures using the TEXTURE::Switch function. I was hoping that I could store all my textures in the Texture mangement class and have a single instance of this class in my engine class (handles everything about the engine). Is there a way I could call the engines TEXTURE class instance from inside the BSPNode class?
I don''t think I was very descriptive but I can''t really describe what I am trying to say. Here''s a small example
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement