# Check out my tutorial on Direct Draw

This topic is 4661 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

http://www.freewebs.com/kingpinzs/DirectDrawTut.rtf Let me know what I can change add or fix thanks.

##### Share on other sites
why not just use direct 3d? also I doubt direct draw will be in directX 10

##### Share on other sites
Direct draw will not be in direct x 10 and also I will not be using direct x 10 for now because direct x 10 only emulates the older versions.
Second I am just learning programming so it is a tone easier to use direct draw because you won’t have to know a ton of math. Also you can still make cool games like aoe 1 and 2 and that is what type of game I am trying to make. I don’t want no fancy dancy same as every one else 3d type game. Also I have people emailing me on how to use direct draw so I am trying to write a tutorial for them.

[Edited by - kingpinzs on January 11, 2006 3:05:07 PM]

##### Share on other sites
tone = ton (English/US) or tonne (metric)
anyway carry on.

edit: oh don't forget:
#include WIN32_LEAN_AND_MEAN//then#include <windows.h>#include <windowsx.h>

and why a windowed mode?

##### Share on other sites
The reason I picked windowed mode is because it took me a few months to figure out how to display direct draw in windowed mode with clipping. And once you get windowed mode full screen will be so much easier..

also does #include WIN32_LEAN_AND_MEAN Acutely help at all. I can never tell the difference when I use it and when I don’t. Also what does it really do?

##### Share on other sites
In an encouraging way, it is more like an over commented program.

For example, this code description:-

[source lang=cpp]//Create the primary surface to be drawn to the screenDDSURFACEDESC2 ddsd;      ZeroMemory(&ddsd,sizeof(ddsd));    ddsd.dwSize = sizeof(ddsd);    ddsd.dwFlags = DDSD_CAPS;    ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE ;         g_pdd->CreateSurface(&ddsd, &g_pddsprimary, NULL);    ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS;

doesn't really explain anything about what is actually happening. ie. why is this -- ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; -- needed? or, what is the NULL in g_pdd->CreateSurface( ... ) replacing?

It is good for those who have previously studied DD, but if you are intending for beginners, I would suggest being a lot more thorough. Explain anything and everything short of the C++ language itself.

Showing and describing structures etc... is also a very good idea. Functions, types etc... should also all be described.

##### Share on other sites
Quote:
 Original post by kingpinzsalso does #include WIN32_LEAN_AND_MEAN Acutely help at all. I can never tell the difference when I use it and when I don’t. Also what does it really do?

It basically cuts out 'uncommon' things from the windows API from your program, thereby making your program smaller and possibly compile faster.

##### Share on other sites
any other segetions

##### Share on other sites
Quote:
 Original post by kingpinzsalso does #include WIN32_LEAN_AND_MEAN Acutely help at all. I can never tell the difference when I use it and when I don’t. Also what does it really do?

Correct me if I am wrong here, but isn't it supposed to be:

#define WIN32_LEAN_AND_MEAN

?

-AJ

##### Share on other sites
Good tutorial. I am just going over Direct Draw after not having worked on it for a while, and its helped a bit. Take the advice others in this thread have given you though to make your tutorial even better, especially in regard to the explanation of the flags your passing rather then giving a vague explanation of what the function does.

1. 1
Rutin
31
2. 2
3. 3
4. 4
5. 5

• 13
• 26
• 11
• 10
• 14
• ### Forum Statistics

• Total Topics
632963
• Total Posts
3009517
• ### Who's Online (See full list)

There are no registered users currently online

×