I just must say that openGL is maybe 94 times easier to learn than directX.
And the amount of code you have to write to achive the same thing is much less.
You can basically start the first time you look at it! (Not like with directx imho)
Check this site out, it is one of the best sites i've ever seen !

http://nehe.gamedev.net/

It has lots of a nice step by -step openGL-tutorials, for almost 20 different programming-languages, including assembler :)
Here is an example of the amount of different platforms and languages every tutorial at on that site supports:

* DOWNLOAD Visual C++ Code For This Lesson.
* DOWNLOAD ASM Code For This Lesson. ( Conversion by Foolman )
* DOWNLOAD Borland C++ Builder 6 Code For This Lesson. ( Conversion by Christian Kindahl )
* DOWNLOAD Code Warrior 5 Code For This Lesson. ( Conversion by David Dolinar )
* DOWNLOAD Cygwin Code For This Lesson. ( Conversion by Stephan Ferraro )
* DOWNLOAD Delphi Code For This Lesson. ( Conversion by Peter De Jaegher )
* DOWNLOAD Game GLUT Code For This Lesson. ( Conversion by Milikas Anastasios )
* DOWNLOAD GLUT Code For This Lesson. ( Conversion by Andy Restad )
* DOWNLOAD Irix Code For This Lesson. ( Conversion by Lakmal Gunasekara )
* DOWNLOAD Java Code For This Lesson. ( Conversion by Jeff Kirby )
* DOWNLOAD Jedi-SDL Code For This Lesson. ( Conversion by Dominique Louis )
* DOWNLOAD Linux Code For This Lesson. ( Conversion by Richard Campbell )
* DOWNLOAD Linux/GLX Code For This Lesson. ( Conversion by Mihael Vrbanec )
* DOWNLOAD Linux/SDL Code For This Lesson. ( Conversion by Ti Leggett )
* DOWNLOAD LCC Win32 Code For This Lesson. ( Conversion by Robert Wishlaw )
* DOWNLOAD Mac OS Code For This Lesson. ( Conversion by Anthony Parker )
* DOWNLOAD Mac OS X/Cocoa Code For This Lesson. ( Conversion by Bryan Blackburn )
* DOWNLOAD MASM Code For This Lesson. ( Conversion by Nico (Scalp) )
* DOWNLOAD Power Basic Code For This Lesson. ( Conversion by Angus Law )
* DOWNLOAD Perl Code For This Lesson. ( Conversion by Cora Hussey )
* DOWNLOAD Python Code For This Lesson. ( Conversion by John )
* DOWNLOAD Solaris Code For This Lesson. ( Conversion by Lakmal Gunasekara )
* DOWNLOAD Visual Basic Code For This Lesson. ( Conversion by Ross Dawson )
* DOWNLOAD Visual Fortran Code For This Lesson. ( Conversion by Jean-Philippe Perois )

//TechnoCore
Posted on 2003-01-06 15:39:15 by TechnoCore
Afternoon, TechnoCore.
And the amount of code you have to write to achive the same thing is much less.

Could you provide an example of that, please?

Cheers,
Scronty
Posted on 2003-01-06 15:58:32 by Scronty

Afternoon, TechnoCore.

Could you provide an example of that, please?

Cheers,
Scronty


I've just started to look at directX :) But just look at this code in openGL for initializing, which I can understand
at once.


int InitGL(GLvoid) // All Setup For OpenGL Goes Here
{
glShadeModel(GL_SMOOTH); // Enable Smooth Shading
glClearColor(0.0f, 0.0f, 0.0f, 0.5f); // Black Background
glClearDepth(1.0f); // Depth Buffer Setup
glEnable(GL_DEPTH_TEST); // Enables Depth Testing
glDepthFunc(GL_LEQUAL); // The Type Of Depth Testing To Do
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really Nice Perspective Calculations
return TRUE; // Initialization Went OK
}

The code for doing the same with directX, I cant even find at the spot, since im a noob ;)
But it's a hell lot more entangled with so many definitions... at least when im looking at it...
Or am I wrong ??

//TechnoCore :)
Posted on 2003-01-06 16:16:53 by TechnoCore
Afternoon, TechnoCore.

That code doesn't do much. Where's the code to choose whether to have it full screen or windowed? What about choosing which depth buffer and back buffer format you want to use? Screen resolution? Hardware supported capabilities? etc, etc.:confused:

That code only proves that OpenGL is only useful for software rendering:grin:

Cheers,
Scronty
Posted on 2003-01-06 17:08:46 by Scronty
I kind of compare OpenGL with C/C++ and DirectX with asm. One has more control and options than the other but OpenGL is more friendly, though it's much better than it used to be.
Posted on 2003-01-06 17:45:02 by drhowarddrfine

Afternoon, TechnoCore.

That code doesn't do much. Where's the code to choose whether to have it full screen or windowed? What about choosing which depth buffer and back buffer format you want to use? Screen resolution? Hardware supported capabilities? etc, etc.:confused:

That code only proves that OpenGL is only useful for software rendering:grin:

Cheers,
Scronty


You are propably right... but I succeded in making some small things in openGL from the very beginning i tried...

DirectX i have tried to get starting with for years... but it has been too much for me.
I guess it's not only DX' fault, because I have been trying to learn OOP (c++) and windows programming at the same
time... and I just choked on all three of them toghether :( (especially the windows part)

Now I have finally got DX to work for me... and I'm soooooo happy :)
(gonna dl all your tutes too, nice site btw!)

//TechnoCore !
Posted on 2003-01-06 18:24:47 by TechnoCore
In DirectX8 everything is 2D. You can use the Direct7 draw interface though. However I have seen some very good 2D engines written in DirectX8. 2D is, as mentioed, just 3D with a fixed Z axis.
Posted on 2003-01-07 03:51:25 by IRBMe
.....er Everything in DirectX8 is 3D I mean
Posted on 2003-01-07 03:52:12 by IRBMe
Hellos

TechnoCore: OpenGL is not "actually" easier the DirectX. They just use different coding styles. Both APIs can do the same things. The only thing is that OpenGL takes time to catch up with DirectX (becuase DirectX is updated regularly) but it does catch-up soon enough (for example shader support in cg). In general one cannot be "better" then the other, It's a matter of opinion, and a matter of which you _personally_ feel more comfortable with. But I dont see any advantage one has over the other. Specific *features* of each API might be easier to implement then the other, but not the whole API.

Also using DirectX 8/9 for 2D would actually be better then using ddraw. Here's why

1: 2d in 3d allows you to use 3d features if needed, for example alpha blending can be invaluable
2: 2d in 3d lets you use 3d accelerators (and todays graphics adapter are mostly optimized for 3d anyway)
3: Once you 'get' 2d in 3d, then starting with 3d will be a snap since you'll already know about coordinate systems, and vertex buffers etc...

Also another way you could implement 2d in dx8/9 would be to use the ID3DXSprite interface. MS specifically included this interface for 2d. And on top of that now with directx9 you have antialiased line drawing interface and you have IDirect3DDevice9::StretchRect, and IDirect3DDevice9::ColorFill :alright:
Posted on 2003-01-25 14:12:42 by IFooBar