Jump to content
  • Advertisement
Sign in to follow this  

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

This topic is 3975 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
Sign in to follow this  

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!