- Joined
- Jun 6, 2008
- Messages
- 12
- Reaction score
- 0
- Points
- 0
Good day.
I have encountered a serious problem I cannot comprehend. My vessels initial visuals are loaded with AddMesh() function calls (5 meshes). During runtime the vessel has to load another mesh and after some time another one. However they are the same mesh file but must be at different vessel locations.
So, I load the first five meshes at startup. After some time I load the first additional mesh. All goes fine until press the I press the key that triggers the destruction of all previous meshes and attempts to load the second additional mesh along with the five initial meshes. What goes wrong is that I get a crash to desktop right before ClearMeshes() is executed. I have already debugged the case and I am certainly confident that it is ClearMeshes() to blame because if I comment it nothing bad happens except I see too many meshes on the screen.
Any help would be appreciated.
P.S. All the meshes are assign to its own animation. No parent/child animations, just plain linear ones.
P.S.S. I used AddMesh(char, VECTOR3) version all the time.
I have encountered a serious problem I cannot comprehend. My vessels initial visuals are loaded with AddMesh() function calls (5 meshes). During runtime the vessel has to load another mesh and after some time another one. However they are the same mesh file but must be at different vessel locations.
So, I load the first five meshes at startup. After some time I load the first additional mesh. All goes fine until press the I press the key that triggers the destruction of all previous meshes and attempts to load the second additional mesh along with the five initial meshes. What goes wrong is that I get a crash to desktop right before ClearMeshes() is executed. I have already debugged the case and I am certainly confident that it is ClearMeshes() to blame because if I comment it nothing bad happens except I see too many meshes on the screen.
Any help would be appreciated.
P.S. All the meshes are assign to its own animation. No parent/child animations, just plain linear ones.
P.S.S. I used AddMesh(char, VECTOR3) version all the time.