Hello everyone ,
This is a new release of 'Focus on 2d in direct3d' book examples. Chapter 4 is the newest addition. Also added some old examples from the 'Windows game programing for dummies examples', look in the 'DirectX Examples" folder. Also converted some windows examples included in the masm package. You can find them in the 'Windows Examples' folder.
You can download the newest release here:

Hi djca,
Thanks!, was there an "logfile.txt" produced? Could you post this file so I could see the information that is in it? I forgot to mention that you should have directx 8.0 or greater to run these examples. What DirectX version is on your computer?
Matt

The problem isn't really in the Clear function, It is because of improper exiting when the program fails to create either a hardware device or a software reference device. I have fixed that and will post the corrections shortly. What I haven't figured out yet, is why both the hardware and software reference devices are failing on your system. I'll look over the code again and see what I find, so far I haven't found anything that jumps out at me, except the problems above. I have a look later on, maybe by tommorrow you or I will have an answer.
Matt

04 Mar 2005, 22:04

madmatt

Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA

madmatt

Hello djca,
Here is the updated version of Chapter 2 Example 4 "Conway's game of life", the only thing I can think of that would cause both device creations to fail is the window isn't being created properly, recompile this program and post the logfile again.
Matt

As you can see here the HAL device is created succesfuly. I don't know maybe there is some kind of difference in the two examples.

05 Mar 2005, 09:19

madmatt

Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA

madmatt

Looks like the Window Creation is ok. Do you have problems with the other examples, or just this one. I'll take a closer look at the code from beginning to end and see what I find.
Matt

05 Mar 2005, 14:39

madmatt

Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA

madmatt

Made a print out of the original c++ code, and everthing is typed in correctly, I did change some of the window creation code a little to allow for an addtion of an icon, here is the original code parameters in asm:

Actually I found that only the examples which use fullscreen run (only fullscreen examples create HAL successfuly). I tried to start the Conway's Game of Life.exe in fullscreen and it starts although the screen image is not changing, but it is running. The examples which use window mode are not running.

05 Mar 2005, 18:50

madmatt

Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA

madmatt

Well, I've run out of ideas. Even with the executable for this particular example that came on the CD_ROM would not create the menu's properly, only after converting to assembly and running/compiling did the menus work properly. Other than that they all ran fine on my system. I can do one other thing, post the original code and executable and you tell me what happens, if the original works on your system, I'll rewrite the code to EXACTLY match the C++ code.
Matt

05 Mar 2005, 21:25

djca

Joined: 14 Jul 2004
Posts: 21

djca

I tried the original and it crashes too. So I gues maybe my video card is having some king of problem with D3D in a window. I'll try it on another computer to see if it is workiing there.

in DirectX programming anything can cause you crash while initialization. In remember that my DirectDraw app crashed when setting cooperative mode because i had bad handle to background in window class of window in that i was running my app.

08 Mar 2005, 12:32

madmatt

Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA

madmatt

Too many things ! Like using this piece of crap called the com interface . And having to deal with lost surfaces . And the one above, the windowed surface, should be easier to setup than it is now . But I'm kind of new to this DirectX way of doing things, Maybe with more time I'll know how to do things as fast as how I did things back in my DOS VESA graphics days, and be a bit happier about DirectX programing as well .
Matt

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum