Jump to content
  • Advertisement
Sign in to follow this  
furiousuk

ID3DXSprite

This topic is 4869 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 C++ and DirectX9.0. My problem is that while I can create an ID3DXSprite object (or an LPD3DSPRITE for that matter) I get an error message whenever I try to use it. I've initialised it like this, <code> ID3DXSprite *m_Draw; </code> I then create it, <code> D3DXCreateSprite(m_d3dDevice, &m_Draw); </code> Then, within BeginScene() and EndScene(), <code> m_Draw->Begin(D3DXSPRITE_ALPHABLEND); m_Draw->End(); </code> This all compiles fine but when I try to run I get this error message: Debug Error! Program: ...SOFT VISUAL STUDIO/MYPROJECTS/DX9LibraryTest/Debug/DX9LibraryTest.exe Module: File: i386\chkesp.c Line: 42 The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention. This error occurs before BeginScene() as my BeginFrame() function encompasses m_d3dDevice->Clear(..) and m_d3dDevice->BeginScene() and the screen does not reset to black (my Clear() colour). I've checked the SDK documentation and they set-up their sprite objects and use them in the exact same way. My Direct3D Device code works fine, it compiled and ran before added in this sprite code and the sprite can be created as the program runs fine if I comment out Begin(..) and End(). What going wrong?

Share this post


Link to post
Share on other sites
Advertisement
use [*source] and [*/source] tags instead (without the *s)


I can't answer your questions though. I have problems compiling even a simple window.

Share this post


Link to post
Share on other sites
First, delete all of your object files in your debug/release directory. Then recompile.

If that does not work, you might have a compiler setting incorrect. Have you changed your project settings recently? Try recreating a new VC++ project and reporting back.

Also, are you running your application on a different computer than you programmed on? Do they both have the latest updates (but not beta) and same DirectX SDK version? By the your error description, it sounds like a function has changed in some DLL but your program does not know about it.

I don't think this is directly tied to ID3DXSprite.

PS: Google Groups if a savior for odd bugs like this.

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!