Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DirectX3 Is HARD!

1 view
Skip to first unread message

Brian Fleming

unread,
Jul 3, 1997, 3:00:00 AM7/3/97
to

Hi, I'm here to whine :-).

I want to do graphics in Windows... I come from DOS, where I can create a
pixel animation using double buffering in about 10 minutes.

I bought a small book on DirectX3, and MAN, is this stuff a pain to learn!!
I can't find the energy to learn all of the intracacies. I figured it
would be easy to get a window up and running with some pixels bouncing
around, but there is so much to sift through... structures up the ying
yang, all these preparations in getting a surface... Geez!

Is programming this stuff going to get any easier? Worst of all, there are
practically no good books on the subject. This book I have called WIN32
Game Developer's guide was written by probably a nice young fellow, but the
book stinks, has a ton of errors in it, and seems to make the subject more
complicated that maybe it is.

Is this the only way to learn how to do graphics in Windows?

Douglas C. Holland (Meldroc)

unread,
Jul 4, 1997, 3:00:00 AM7/4/97
to Brian Fleming

Brian Fleming wrote:

> Hi, I'm here to whine :-).
>
> I want to do graphics in Windows... I come from DOS, where I can
> create a
> pixel animation using double buffering in about 10 minutes.
>

I know exactly where you come from, I'm trying to learn DirectX as well.

> I bought a small book on DirectX3, and MAN, is this stuff a pain to
> learn!!
> I can't find the energy to learn all of the intracacies. I figured
> it
> would be easy to get a window up and running with some pixels bouncing
>
> around, but there is so much to sift through... structures up the
> ying
> yang, all these preparations in getting a surface... Geez!
>
> Is programming this stuff going to get any easier? Worst of all,
> there are
> practically no good books on the subject. This book I have called
> WIN32
> Game Developer's guide was written by probably a nice young fellow,
> but the
> book stinks, has a ton of errors in it, and seems to make the subject
> more
> complicated that maybe it is.
>

I have the exact same book -- it tries to stick to the bare essentials,
but it leaves out a lot of necessary material (including half of the
Win32 programming you need to know before you can hack DirectX, not to
mention most of Direct3D.) I've resorted to printing out the MS-Word
versions of the online DirectDraw documentation -- at least that has a
DirectDraw tutorial and complete documentation of all the structures,
macros function calls & other such stuff.

> Is this the only way to learn how to do graphics in Windows?

I've resigned myself to the fact that before I can really learn
DirectX, I have to learn at least a little bit about Win32, so I just
got Programming Windows 95 by Charles Petzold, considered by many to be
the "bible" for basic Win32 programming. It doesn't go into any of the
class libraries like OWL or MFC, it teaches basic Win32 using straight
C. I'm going to read through that so I can get on top of basic Windows
programming, then I'm going to tackle DirectX to do the fast game
stuff. But yes, Windows programming is a royal pain in the
hindquarters. I've never seen an 80 line(!!!) Hello World program with
gigantic structs and over a dozen function calls before I started
looking at Windows programs. The worst part of it is you have to know
at least a little bit about all that overhead before you can even start
playing around.

Doug

Douglas C. Holland (Meldroc)

unread,
Jul 4, 1997, 3:00:00 AM7/4/97
to Brian Fleming

Brian Fleming wrote:

> Hi, I'm here to whine :-).
>
> I want to do graphics in Windows... I come from DOS, where I can
> create a
> pixel animation using double buffering in about 10 minutes.

(the rest clipped... you've read it already)

Here's another thing that might help. It's a lot easier to use the
source code on the CD-ROM that came with the book (Win32 Game
Development Guide with DirectX 3, not to mention Programming Windows
95.) Rather than building your own program from scratch, simply copy &
hack the example programs (that's what they're there for,) and let
someone else do the hard work. Do read the source code, try to figure
out how it works, but you don't have to write the whole program
yourself, since most of that stuff is overhead anyways.

Doug

David Torrez

unread,
Jul 4, 1997, 3:00:00 AM7/4/97
to

Douglas C. Holland (Meldroc) wrote:

> I've resigned myself to the fact that before I can really learn
> DirectX, I have to learn at least a little bit about Win32, so I just
> got Programming Windows 95 by Charles Petzold, considered by many to
> be
> the "bible" for basic Win32 programming. It doesn't go into any of
> the
> class libraries like OWL or MFC, it teaches basic Win32 using straight
>
> C. I'm going to read through that so I can get on top of basic
> Windows
> programming, then I'm going to tackle DirectX to do the fast game
> stuff. But yes, Windows programming is a royal pain in the
> hindquarters. I've never seen an 80 line(!!!) Hello World program
> with
> gigantic structs and over a dozen function calls before I started
> looking at Windows programs. The worst part of it is you have to know
>
> at least a little bit about all that overhead before you can even
> start
> playing around.

Yep, I just redesigned my thinking as well. I have done some OWLand
MFC, not to mention RAD stuff, but I still find myself severly
lacking knowledge of what is going on. I decided to bite the bullet
and buy Petzold (last night!). I just finished chapter 2 and I cannot
tell you how clear things are becoming just from reading these first
two chapters. I hope the rest of the book continues the way
these first two chapters were presented.

Dave - za...@pacbell.net

Chris Marriott

unread,
Jul 4, 1997, 3:00:00 AM7/4/97
to

In article <33BD0842...@pacbell.net>, David Torrez
<za...@pacbell.net> writes

>Yep, I just redesigned my thinking as well. I have done some OWLand
>MFC, not to mention RAD stuff, but I still find myself severly
>lacking knowledge of what is going on. I decided to bite the bullet
>and buy Petzold (last night!). I just finished chapter 2 and I cannot
>tell you how clear things are becoming just from reading these first
>two chapters. I hope the rest of the book continues the way
>these first two chapters were presented.

Welcome to the world of "real" Windows programming! It's a refreshing
change to find someone willing to learn what's REALLY going on, rather
than treating the whole thing as a "black box" which they don't really
understand.

You're doing the right thing - you won't regret it.

Chris

----------------------------------------------------------------
Chris Marriott, Microsoft Certified Solution Developer.
SkyMap Software, U.K. e-mail: ch...@skymap.com
Visit our web site at http://www.skymap.com

Raymond Chen

unread,
Jul 4, 1997, 3:00:00 AM7/4/97
to

On Fri, 04 Jul 1997 00:38:01 -0600, "Douglas C. Holland
(Meldroc)" <hol...@cs.colostate.edu> wrote:
>I've never seen an 80 line(!!!) Hello World program

It doesn't take 80 lines to do a Hello World.

/* GUI app */
int
WinMain(HINSTANCE hinst, HINSTANCE hinst0,
LPSTR cmdLine, int nCmdShow)
{
return MessageBox(NULL, "Hello, World!",
"Sample Program", MB_OK);
}

/* console app */
int main(int argc, char **argv)
{
printf("Hello, world!\n");
return 0;
}
--
(My return address is intentionally invalid; delete ".---" to get my real address.
My responses are not to be considered official technical support or advice.)

Tyson Jensen

unread,
Jul 7, 1997, 3:00:00 AM7/7/97
to

> >I've never seen an 80 line(!!!) Hello World program

> /* GUI app */


> int
> WinMain(HINSTANCE hinst, HINSTANCE hinst0,
> LPSTR cmdLine, int nCmdShow)
> {
> return MessageBox(NULL, "Hello, World!",
> "Sample Program", MB_OK);
> }

I think the 80 line "Hello World" program was a program to draw "Hello
World" without resorting to using Microsoft common dialogs. Doing "Hello
World" the hard way takes about 20 lines at least (the smallest one I've
seen). I've seen a "Hello World" program for Windows that was 80+ lines.
The 80+ line program was designed for future chapters, but I forget which
book I saw it in. (I put the book back).

Of course, the common dialogs make life much more manageable!

--
Tyson Jensen
tje...@mosbych1.com

Dan Pop

unread,
Jul 10, 1997, 3:00:00 AM7/10/97
to

In <33bf3d47...@157.55.96.156> raym...@microsoft.com.--- (Raymond Chen) writes:

>It doesn't take 80 lines to do a Hello World.
>

>/* GUI app */
>int
>WinMain(HINSTANCE hinst, HINSTANCE hinst0,
> LPSTR cmdLine, int nCmdShow)
>{
> return MessageBox(NULL, "Hello, World!",
> "Sample Program", MB_OK);
>}

Needs #include <windows.h> to compile.

>/* console app */
>int main(int argc, char **argv)
>{
> printf("Hello, world!\n");
> return 0;
>}

Needs #include <stdio.h> (or a prototype for printf) to avoid invoking
undefined behaviour (printf being a variadic function).

Dan
--
Dan Pop
CERN, IT Division
Email: Dan...@cern.ch
Mail: CERN - PPE, Bat. 31 1-014, CH-1211 Geneve 23, Switzerland

0 new messages