Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: .DuplicateMesh fails for .LoadSkinMesh  (Read 790 times)
shadow4444
Community Member
*
Posts: 21


« on: December 29, 2002, 09:00:10 PM »

If a mesh is created from a .DuplicateMesh, and the mesh that is being duplicated was loaded via .LoadSkinMesh the mesh does not render.  If it were a 3ds loaded via .Load3Ds it works fine.  I eliminated most every variable in a test project until I realized it was the .DuplicateMesh causing a problem.

I preload my meshes on load, as I reuse them repeatedly
Code:
   
    'cache mesh
    Dim objMeshToDupe as TVMesh
    Set objMeshToDupe = g_objScene.CreateMeshBuilder

    'this will work
    'objMeshToDupe.Load3DsMesh App.Path & "\media\test.3ds"
   
    'this will not
    objMeshToDupe.LoadSkinMesh App.Path & "\media\test.x"
   
    objMeshToDupe.Enable False


Then I use them later, something like this:
Code:

    'duplicate and use cached mesh
    dim objMesh as TVMesh
    Set objMesh = objMeshToDupe.DuplicateMesh    
    objMesh.Enable = true
    With objMesh
        .SetMaterial GetMat("mat0")
        .SetMatrix mtxOrigin
    End With


Any ideas?
Michael
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks