Jump to content
  • Advertisement
Sign in to follow this  
outsider84

windowsmobile directx unloading mesh problem

This topic is 3886 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In my newly created 3D terrain engine i have a problem of being out of memory in C# managed environment for windows mobile 5.0 os. The engine is supposed to load and unload tiles as camera moves around in the area. the problem is after a little bit of tripping around, i got either of invaliddrivercallException while trying to loadtexture from file or outofmemory exception while trying to load a new mesh. I have written a GraphicsMesh class to wrap directx.mesh, i am trying to unload and load mesh via methods of this wrapper class. The thing is i always unload meshes that are out of sight before loading new ones. But memory pool goes down and down(checked with device.GetAvailablePoolMem(Pool.SystemMemory)). I can supply code, but here is the very simplified version of what i am doing. while unloading a mesh. this.mesh.dispose(); this.mesh = null; this.texture = null; while loading the following are called: TextureLoader.FromFile(device, texturefilename); mesh = MeshLoader.LoadMesh(device, dataStream, MeshFlags.SystemMemory, out meshMaterials, out textureFilenames); i kind of simplified it. thanks for any information in advance. ps: i am total newbie opening a new thread in a forum. I am not sure i have given enough information and positive feed-back would be great.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!