Jump to content
  • Advertisement


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


Function returns S_OK but debug spew says different

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

I''m using DX9.0b and I have a small .x file that I''m trying to load. It''s just a red sphere that I want to place at the position of the light sources in my scene so that I can tell if the lighting looks right. I use the function D3DXLoadMeshFromX. This function returns S_OK but the debug spew (with debug output level at maximum) says this: D3DXOF:426596: syntax error near "0.000000" D3DXOF:XStreamRead::GetNextObject: Error while parsing stream D3DXOF:GetNextObject: Parse error. The mesh loads and displays just fine with Mview. I believe my code for loading the mesh is ok because it works just fine when I load and render another mesh that has over 75k vertices using many different textures and materials. After I''ve loaded the model I went ahead and locked the buffers so that I could see what data was actually loaded. The data that''s being loaded is all wrong, especially the index buffers. Some of the values in the index buffer are numbers like 4294967295 which is the maximum value of a DWORD (0xffffffff). Given the fact that the mesh only has 89 vertices, I think it''s safe to say that values like this are incorrect. I went ahead and tried to render the small red sphere but naturally, DrawIndexedPrimitive fails because some of the indices are messed up. I''ve tried reinstalling the SDK and that''s no help. But I have noticed that it renders just fine if I use the Retail runtime but not the Debug runtime. The values in the buffers are still wrong, but somehow, it works using the Retail runtime. Does anyone have any ideas on what could be causing this weirdness? Thanks a lot, neneboricua

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.

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!