Sign in to follow this  

windowsmobile directx unloading mesh problem

This topic is 3674 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

This topic is 3674 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this