Jump to content

  • Log In with Google      Sign In   
  • Create Account


Nothing is drawing to the screen [FIXED]


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Akashi   Members   -  Reputation: 268

Like
0Likes
Like

Posted 13 June 2013 - 11:04 PM

Alright, so I started reading through my tutorial books again and I decided to try one of its implementations, but I tried making a class that handles it. After I got everything set up, no errors were given, not even failed initializations, but the functions called only drew black to the screen. Clear() worked for my Direct3D device when I changed the color, but it still didn't displaying the bitmap. If I changed the file directory, there was surface loading error, so I knew that my program could find my image file, but when it did, it simply didn't draw it. I've checked, and the code after Device->BeginScene was executed, returning true, and the code inside its if statement executed as well, and Device->Present was also called. So why? I tried putting everything in the WinMain.cpp file as well, as the book did it, but it gave me the exact same results. I scoured Google already, so here's my help topic.

 

d3d9.lib and d3dx9.lib are both included. The Include and Lib/x64 directories are added from DirectX's June 2010 folder.

 

Here is my code:

 

WinMain.cpp

Spoiler

 

DXGraphics.cpp

Spoiler

 

Definitions.hpp

Spoiler

 

DXGraphics.hpp

Spoiler

 

This is the image I am simply trying to draw; as you can see, it is clearly not just black:

mufntron.bmp

Spoiler

 

 

FIXED:

 

Okay, I feel a little dumb. I forgot to add in the D3DXLoadSurfaceFromFile() function. Sorry. I was freaking out for nothing, lol.



Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS