DX8 (very) newbie problem

Started by
16 comments, last by olemann 21 years, 11 months ago
quote:Original post by a person
my suggestion is to get another book. make sure its a basic book since you dont seem to know the win32 api yet. learn the win32 api correctly. also, i would ask ppl a good book to use, as well as read user reviews at sites like amazon. this will ensure you get a great book for your level and not something that teaches things wrong to make it "easier". ANY book where the examples dont work would go back to the store if i bought it. worst case is that they dont take it back, but more then likly you can get store credit (dont ask for money, less chance they will consider that). you can then put that towards a better book. amke sure the book is in good condition, cd is in the sleeve, and you do it soon. the longer you wait the harder it becomes. just tell them that the cd is not working and that you think it might be because the stuff is too advanced for your computer. most books dont give system requirements on the cover so you are lucky in that respect.


Well, I think Andre LaMothe''s books covered the basic Win32 API stuff that I needed to know. As far as I can see, this problem is not a WinAPI problem, but more of a DirectX one. And even though this book by Peter Walsh is called "Advanced 3-D game programming" I am really not too intimidated by the level of difficulty. It''s just that i can''t seem to get the code from _that_ book to work on my computer. Other DirectX applications I have compiled, work like a dream. Would just be nice to make his examples work, too.

(I bought the book on Amazon.co.uk a month ago, and I live in Norway, so I guess I won''t bother to try to return it).

Thanks, anyway! :-)
Advertisement
russian-bear: Thank you for an informative answer. I''ll take a look at the code you pointed out could make a performance hit, and see if I can do some changes there.

Guess I will get out and buy "Programming Role Playing Games with DX8", and have a look at that. :-)

Guess I won''t give up on Walsh''s code, since I have no problem getting other DX8 2D/3D programs compiling and running.

Thanks for all your help, and I''m sure this won''t be the last time I''m posting here. You guys answered pretty fast and friendly, compared to other boards I''ve been to.
Try to search books at ''www.Pricerunner.com'' i found books there much cheaper than at ''Amazon'' !
< There are no stupid questions, only stupid answers! >
Your problem is actualy in the quality of your hardwar combined with the non-quality of walshes code you have a geforce 2 so to run these samples you must use ref rast and wash does not provide the correct code to do that job.
Great White Hunter Hunt to kill, kill to live, live to hunt.
I have Peter Walsh''s The Zen of Direct3D. I had problems with most (if not all) the source code on the CD when starting to render full-screen 3D scenes. I went to the Primier Press website, found his book (and downloads, etc.) at http://www.premierpressbooks.com/searchdetail.asp?ID=53429

He mentions this for *GeForce users*:
"New GeForce cards do not like using the alpha channel, particularly on XP. Use of the alpha channel causes the frame rate to drop to very low levels and sometimes appears to stall the machine. To disable the alpha channel change the flag, in the setup code, from D3DFMT_A8R8G8B8 to D3DFMT_X8R8G8B8, which does the trick."

I did this and it did the trick (as I have a GeForce3 Ti-500). Thought it might help with your problem.
But if you turn off alphablending how are you supose to make semitransparent objects or textures?
< There are no stupid questions, only stupid answers! >
quote:Original post by Anonymous Poster
...

He mentions this for *GeForce users*:
"New GeForce cards do not like using the alpha channel, particularly on XP. Use of the alpha channel causes the frame rate to drop to very low levels and sometimes appears to stall the machine. To disable the alpha channel change the flag, in the setup code, from D3DFMT_A8R8G8B8 to D3DFMT_X8R8G8B8, which does the trick."

...



I tried this, and now every bit of code I''ve tried to compile with Walsh''s methods, so far, works smooth! Thanks a lot for this tip, now I can finally see the code in action. Even though, as ''russian-bear'' says, it can get me in trouble when I try to make semi-transparent objects/textures.. :-)

Thanks a lot.
Actually, what he wants you to change is just the texture format for the front/back buffers. I also had a similar problem while working on a project of mine. Although the buffers can''t have an alpha channel, it is still perfectly acceptable to have all your other images have one. Virtually every image in my current project has an alpha channel and I have no issues with it on my computer (Athlon 1.2, 384mb, GF2 Ultra, WinXP) or any other ones I have access to.

This topic is closed to new replies.

Advertisement