Sign in to follow this  

Multiple meshes (another mesh/directx question)

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

hmm, another directx mesh question, i can tell it's going to be one of those nights :S alright, i have multiple meshes in my game, one for a player's character (a racing car in this case) and some scenery meshes, such as a skyscraper, my problem is, i can only seem to load one mesh at a time and display it., my loader looks like this: D3DXLoadMeshFromX( MeshName, D3DXMESH_SYSTEMMEM, g_pd3dDevice, NULL, &pD3DXMtrlBuffer, NULL, &g_dwNumMaterials, &g_pMesh ) and is part of a class "Object" of which the car and building are instances. i load the meshes for them like so: Racer.LoadMesh(g_pd3dDevice, "GravRacer.x"); Building.LoadMesh(g_pd3dDevice,"Skyscraper.x"); trouble is, once i run the program, my player's car is now a skyscraper... i can't figure out how to make it so both meshes load :S any thoughts?

Share this post


Link to post
Share on other sites
are you perhaps loading all the meshes into the same g_pMesh? OR are you in fact rendering all the meshes in the same place but you only see the sky scraper because its the biggest one / last drawn and contains all the others? hard to tell but theres a couple of suggestions.

Share this post


Link to post
Share on other sites
they render in different positions in the scene.

I am using the same g_pMesh, however so was the program i used as a reference. the load from x function is in the load mesh part of a class, same as the program i used as a reference, and that one loads multiple meshes no worries.

[Edited by - Malazar on May 10, 2007 7:15:15 PM]

Share this post


Link to post
Share on other sites

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