Hi,

About two days ago I started reading the openGL tuts on NeHe, and I've been just wippin through them it's been making complete sense all of a sudden (many failed atempts before, although learning to use win32asm has made my thinking and understanding a lot clearer), OpenGL is cool and from my attempts at DirectX (before tried ogl) I found it a bit confusing... could have been the whole mfc thing, or just the way MS does their samples and tuts... :o

Anyways my question might sound stupid but are there speed differences between GL and DirectX? Would it be smarter to start my bigger projects that I have planned in DirectX instead of OpenGL? And should I combine OpenGL and DirectX? I've seen a few tuts that use GL then use DirectInput for the mouse and keyboard. Why is this?

I'll still be continuing my persuit through the OpenGL scene until I get more experienced then I move onto Direct3D. Heh, I'm sure it will look good on a resume but I'll probably never get into game programming professionally.

Thanks for your responses,
JamesE


Rereading my post, the question doesn't seem so stupid after all, but a completly vaild question.
Posted on 2002-03-01 20:11:37 by JamesE
I think that (certainly in the future) DX is faster given the wide range of hardware support that is sprouting up for it. But then again on older machines this might not be the case :/

I think the only way would be to recreate the situations you use in both DX and OGL and just time to see what goes fastest.

Not much of an advice ;)
Posted on 2002-03-01 20:44:33 by Hiroshimator
Here's a site that has a very technical explanation http://www.xmission.com/~legalize/d3d-vs-opengl.html . In my experience with D3D or OGL, D3D is harder to code, OGL is easier and much more appealing to a programmer since it's just like using a win32 api call. As for speed they say D3D but I can't gaurantee that. I suggest don't go and ask this question to a newsgroup like comp.graphics.api.opengl or microsoft.public.win32.programmer.directx as they will be very biased on OGL or D3D. If you go to an OpenGL forum or an OpenGL newsgroup they will say OpenGL is faster than D3D and much easier to code, same response you'll get from a D3D forum/newsgroup. Me?, I code in D3D, why? because the evil empire always have better technology ;) than the good guys. Seriously, it depends on your taste/choice. If your creating a game in OpenGL and it needs user interaction you'll always fall back to DirectX(DirectInput). :) . But as far as D3D vs. OpenGL I think the choice is up to you.


The evil empire from star wars has a better technology than the good guys ;)
Posted on 2002-03-01 22:42:41 by stryker
D3D and OpenGL are about the same speed, if the hardware manufacturer didnt mess up with the drivers. On some machines OpenGL Driver is just a wrapper over Direct3D.

IMHO those manufacturers should be shot :).

With OpenGL you will have the advantage of hardware independance. You can even buy an OpenGL for the PS2 (if you have an agreement with Sony). But you will need D3D for XBox (In last year GD Conference, Abrash stated that it could be possible to make an OpenGL Driver, since its very similar to a PC, buch chances are there will not be a driver any time soon since M$ is putting all their resources on D3D).

Also, if you learn OpenGL your skill will not be limited to game developer but also to Graphic Editors (There are some artist card that ONLY support OpenGL Acceleration).

Anyway D3D and OpenGL arent that different nowadays, (makes you think why M$ needed to waste time on something that was already there)

PS:
As for resume, learn both. And also learn to make reusable components instead of cut and paste every time you make a new project. In the long run you will have reliability without waste of time. Which is a very good plus on any game development company.
Posted on 2002-03-02 14:21:33 by dxantos
Afternoon, JamesE.

I'd suggest using DX8.1:alright: (though I may be a little bit biased with regard to it:grin: ).

I'm just too lazy to take the two weeks necessary to learn OpenGL;).

I guess it all depends on what hardware you'd like to target. If you're targeting older pcs, then use OpenGL. If you're targeting modern hardware, then use DX8/8.1 . Modern Vid cards do most of the 3D processing on the card, and there hasn't been any major updates to OpenGL over the last few years. After all this time, D3D has *finally* passed OpenGL.

Then, again... I really dunno how easy/difficult it'd be to put an OpenGL proggy into hardware vertex processing mode.

There's heaps of examples on the net for OpenGL. It may be easier to start with them first, then switch to D3D.


Cheers,
Scronty
Posted on 2002-03-03 06:48:24 by Scronty
OpenGL automatically do the transformations on hardware when the hardware is available, it has been doing this since before Direct3D was even a tough.

As for any advantage that D3D has from OpenGL. Well, you can get the available video memory. (havent found a way without DX). Also you cannot access the back/front buffers directly on OpenGL. (Not that you will want to, if you do you are basically trashing hardware acceleration, thus things could get very slow).

And the vertex and pixel shaders are standarized. The 2 vendors that supports vertex and pixel shaders also have their extension to shaders on openGL, the problem is that they are not compatible. Hopefully OpenGL ARB will put some sense into this with the upcomming OpenGL 2.0 revision.
Posted on 2002-03-03 08:19:06 by dxantos
I started with D3D but moved to OpenGL, I much prefered it. But I never had enough experience with D3D to compare them properly.

Why not do a search for OpenGl v D3D posts on the opengl.org forums, granted they are slightly biased but there is genunly useful info to find in them as well.
Posted on 2002-03-03 12:12:09 by Eóin
Thanks for the very informative info guys! I can't wait to start programming some cool demos! I've got a Toshiba Satellite (433mhz celeron :( and 64mbRAM (think more ram would help though) so my system starts bogging down fast. This is a bummer!! Are their PCMCIA video accelerator cards on the market for us laptop gamers/programmers? I'd hate to have to buy a desktop computer so I can play my games etc.
Posted on 2002-03-03 12:23:15 by JamesE
There's a good graphics card called Geforce2Go or Quadro2Go(best for 3d apps - like 3d animation, 3d modelling...), check out www.nvidia.com
Posted on 2002-03-03 12:30:37 by stryker
Yes,

I can just support this.

I own this card in my laptop and I can say it is incredible fast. Sure, you might get somewhat warmer knees, but who cares?

I am able to play all recent games, that are up at the moment.

In my free time, when I am too lazy to code, I just fire up RTCW, Serious Sam 2 oder UnrealTournament, and in Graphics Quality and Speed I f**k up all the other machines around running equal hardware.

If you have the chance, grab one

YaWNS aka Stefan K.
Posted on 2002-03-03 15:31:30 by YaWNS
I checked out their website and noticed Geforce4Go, think it would be worth the extra buck? Haven't seen the price but I'd expect it to be up there!

Yawns, what kind of laptop do you have? I'm wondering about compatiblity problems... don't wanna buy and get burned since toshiba doesn't even list my series (2610) on their website anymore except on their ugly canadian :) website. As you can tell I'm not much of a hardware person, but when they say Maximum 192MB SDRAM does that mean like per slot or total? How come you can't just plugin a 512mb stick?

Thanks,
James
Posted on 2002-03-03 18:34:22 by JamesE
Problem with most laptops is lack of hardware acceleration. Hoever a laptop with GForce2go is a good option. (since its accelerated).
Posted on 2002-03-04 07:59:24 by dxantos
Yawns, what kind of laptop do you have? I'm wondering about compatiblity problems...


Hey,

I own a Toshiba Satellite 3000 - 100, it has had the Geforce already in there, that was one reason why I bought this one and not another one.

As for your thoughts about incompability I have to admit, that I can't really help you there. I am not that much in hardware and compabilities. I don't even know if one can exchange the graphics card.

Sorry

YaWNS aka Stefan K.
Posted on 2002-03-04 08:15:29 by YaWNS
Internal code of opengl is slower than dx's, but dx calling convention (COM stuff) is slower than APIs . so it depends on 2 things:
1: size of project you're making
2: type of project you're making

for games i prefer dx
for some technical programs use ogl

but that's only my opinion



---------------------------------------------------
The only way to achieve the goal is fight.
(but i always forget that one:(
---------------------------------------------------
Posted on 2002-03-31 12:40:10 by ti_mo_n