Direct Draw vs. D3D

Started by
5 comments, last by elis-cool 21 years, 10 months ago
Well I just sent a test of my new game to someone and guess what... it didnt work!! it is a direct draw game and it worked for other people, but it crashed when it got to making surfaces and the card was a Matrox Millenium II, so does DDraw have problems with this card? Well now on to the guts of my post after that little intro Which would give me better performance and compatibility? I have been told that 2D in D3D is quite easy... well so is it? I am reading TOTWGPG and have read all the direct draw section and so I only know DirectX 6, so should I go upto directdraw 7 or go straight up to D3D8? The thing is (I could be wrong here) I dont know whether I want a whole bunch of DirectX function calls littered throughout my code, in DDraw you just initilize some stuff and call blt() in your renderScene() function, and that is all the DirectX code there is! is it like that in D3D?? So basicly any comments would be helpful... CEO Plunder Studios
[email=esheppard@gmail.com]esheppard@gmail.com[/email]
Advertisement
"out of the box", d3d is not as simple as ddraw. However, you can very quickly implement a wrapper around either d3dxsprite or your own 2d functions that will allow you to use the same easy functions.

take a look at d3dxsprite and/or the 2D in dx8 articles on this site.
Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials
ddraw is more compatible. also you shoudl check the error codes returned. likly you are requesting a video surface when there is no more vram left. alos possible you are using a video mode not suported by the card. ddraw is quite basic and most cards support everything. you need to post why it did not work. i say its your code. i never had problems on matrox milleniums while using direct draw, even when doing some fancy stuff. highly likly you are doing something wrong, and it just happens the matrox drivers are more stringent then other video card drivers.
well I made it so that all the surfaces were created in system RAM and it worked, only problem is it ran horribly slow. So there must have been no VRAM left... Dont you get all the VRAM??

CEO Plunder Studios
[email=esheppard@gmail.com]esheppard@gmail.com[/email]
I just started using Direct3D for 2d stuffs about 5 days ago, and I love it. I found DirectDraw to act kinda funny on some peoples'' video cards too; on my Voodoo 3 one of my games worked perfectly, but on other peoples machines it did anything between locking up, drawing some green rectangles before locking up, and starting, showing a black screen and suddenly quitting. I think I didn''t check enough of the DirectDraw functions I used for errors .

In any case, D3D is very compatible if you make sure to select a video mode and format that is commonly supported. Besides, D3D is just SO much better than DirectDraw, it''s incredible: easy rotation, alpha blending, cool lighting effects, the ability to easily add some minor 3D stuff to your 2D game, an actual camera you can move around, etc. Try D3D on your next game. It''s sorta hard to understand, but if you get it, you''ll never look back.




Things are not what they are.
Well I have decided to learn d3d and port my game over to it, I must say the initialization in very easy compared to ddraw! but thats about where the easyness stops! its not so much as hard as there are a ton of function calls and what not...

CEO Plunder Studios
[email=esheppard@gmail.com]esheppard@gmail.com[/email]
If you are using D3DXSprite, there should be almost exactly the same number of calls in D3D as in DirectDraw, excluding BeginScene and EndScene. Besides that, it''s just clear, blit a few things, and flip.




Things are not what they are.

This topic is closed to new replies.

Advertisement