Advertisement

BSP's and textures

Started by November 06, 2000 08:36 PM
-1 comments, last by Spanky 24 years, 2 months ago
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 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

This topic is closed to new replies.

Advertisement