Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Hog

Failed to load mesh

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

If I select my adapter to init3D then select a mesh file all works OK. If I continue to select mesh files all works OK. But if I reselect my adapter which will init3D again from scratch, even if I ensure all previous objects are destroyed I get an error when I attempt to open a mesh? I cannot see what is wrong? The init3D call returns true so no problem there, but it fails in the call to load the mesh?? Any clues?

Share this post


Link to post
Share on other sites
Advertisement
OK I sussed this But am confused a bit...

Pragram Loop

Init3D
...
...
...

'' user selects different adapter

If Not m_obj3DDevice Is Nothing Then

m_obj3DDevice.Dispose()
m_obj3DDevice = Nothing

End If

...
...
...

'' recreate device using new adapter

Init3D()

Loop

So this is a rough outline of the app. Point is this..

Each time Init3D is called the code m_obj3DDevice = New Device(params etc) runs which sets up the device. Init3D returns True which lets the program carry on. But come load mesh time the error I get is the m_obj3DDevice is not set to an instance etc.

When removing the Dispose and Nothing lines all works well.

So I''m confused! I though that if I called a line which created a new object then that is what happens, a new object is created, but it appears not?



(Visual Basic .NET) www.elpuerco.co.uk

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!