Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualStoneMask

Posted 14 June 2013 - 01:27 AM

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.


#7StoneMask

Posted 14 June 2013 - 01:10 AM

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

 

Just in case, here are some of my specs from DxDiag, though I've already tried it on a different computer that has historically never had this issue with this kind of code:

Spoiler

#6StoneMask

Posted 13 June 2013 - 11:14 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. I even changed the color that clears the backbuffer, yet the screen is still drawn in black. 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

 

Just in case, here are some of my specs from DxDiag, though I've already tried it on a different computer that has historically never had this issue with this kind of code:

Spoiler

#5StoneMask

Posted 13 June 2013 - 11:13 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. I even changed the color that clears the backbuffer, yet the screen is still drawn in black. 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.

 

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

 

Just in case, here are some of my specs from DxDiag, though I've tried it on a computer that has historically never had this issue:

Spoiler

#4StoneMask

Posted 13 June 2013 - 11:09 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. I even changed the color that clears the backbuffer, yet the screen is still drawn in black. 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. and the code inside the 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.

 

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

 

Just in case, here are some of my specs from DxDiag:

Spoiler

#3StoneMask

Posted 13 June 2013 - 11:09 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. I even changed the color that clears the backbuffer, yet the screen is still drawn in black. 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. and the code inside the 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.

 

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 simply black:

mufntron.bmp

Spoiler

 

Just in case, here are some of my specs from DxDiag:

Spoiler

PARTNERS