Jump to content
  • Advertisement
Sign in to follow this  
GuestUnit

Sprite can only load in windowed mode

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

Using Microsoft Visual C++ 2008 Express Edition. I tried to learn more about sprites using DirectX, but I ran into two interesting problems: 1. I need a custom build to load files with .png extensions. Anyway to solve this? I converted the .png image into a .bmp (save as...), and replaced what was needed. Now here's the second problem: I can only load .bmp files if it's compiled and ran in windowed mode. If I run in full screen, I get a message about an unhandled exception; an access violation. Unhandled exception at 0x004013b8 in dx9 sprites.exe: 0xC0000005: Access violation reading location 0x00000000. A yellow arrow points at: d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0); What does this indicate and how can it be solved? Thanks for whatever help you can give.

Share this post


Link to post
Share on other sites
Advertisement
I need a custom build to load files with .png extensions. Anyway to solve this?
What do you mean? DirectX can load .png .bmp .jpg .tga ... What error are you getting? Is it compile time? Run time?

Unhandled exception at 0x004013b8 in dx9 sprites.exe: 0xC0000005: Access violation reading location 0x00000000.
Your directX device initialization failed. Check the return value from IDirect3D9::CreateDevice.

Share this post


Link to post
Share on other sites
Gah, sorry for wasting your time.

It turned out that it was just the IDE complaining about a lack of a .png builder. I thought it knew that DirectX could load them.

I don't know why, but I re-did the tutorial and didn't get the DirectX initialization failure. I guess I made a typo during the editting and never caught it.

But thanks for the last problem, it might help me in the future.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!