I am attemping to write scene manager. I just need to display 1 or more 3d objects, loaded from .x files.
The Problem :
Renderable3dObject.InitGeometry(..) will load a xfile, material, and texture into its class. This works without any problems. If I take the class instance, and insert it into an stl (Standard template library) list. The texture memory becomes invalid. I dont understand why?
To Assist :
Here is the code im working with... Its extremely simplified and anyone with experience should be able to help. (*link here) Download the Source (Visual C++ 6 or 2003)
I would greatly appreciate any assistance :)
any ideas???
-sd
__________________________________________________
heres the basic outline...
initialize windows
initialize directx
// my problem is right below this, I can load the xfile and textures
// but once i leave the function, only the texture / material
// memory becomes invalid???
load world entities using a list ( ie. stl::list<Renderable3dObject> )
L list<Renderable3dObject>.insert( myXFileClass )
main game loop
L for all entities in list
L e.RenderSelf( ) ( this does not work, because of invalid memory )
cleanup











