Sign in to follow this  

DirectX 2004 with Visio 200 'Empty Project' sample - problem with mesh materials

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

Hi there, I am using Visual Studio 2005 (C++) on Windows 2000 but only have the Dec 2004 DirectX 9 SDK. I know, you suggest an upgrade, and I will be sure to pass that on, but for now I am stuck with what I am given. A few things have broken, such as all mesh loading, but I have fixed around them (ignoring libcp.lib, if you are familiar with the problem). Problem is, there's another problem with the loading of materials. The specific class I'm referring to is in the 'Empty Project' sample, and is called 'DXUTMesh' in the DXUTMesh file. It takes several variables, all of which seem to be fine when they are passed in, but one line seems to mess things up, and it is as follows: D3DXMATERIAL* d3dxMtrls = (D3DXMATERIAL*)pMtrlBuffer->GetBufferPointer(); The problem specifically is that pTextureFilename, a property of d3dxMtrls, is returned as 'bad ptr'. I have checked that the files and all that are in the same directory, although I'm pretty sure it's a problem with the class because in their own tiger example, which uses the same code exactly, no materials are used. I figure because it's black. The lights are on also, so it's not that.

Share this post


Link to post
Share on other sites

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