The two are just different....
OpenGL is a procedural interface. You have to keep track of most things yourself and issue calls like glVertex3D(x,y,z);
D3D is an OO interface. You instantiate objects to do the job.
There are advanatages and disadvantages to both approaches. It's very easy to get an OpenGL project up and running: with a very few function calls, I can get something displayed on the screen. D3D is so complicated, and has gone through so many itereations, that it's difficult to even get a D3D program running if you haven't done it before: add to that the fact that the manged documentation isn't current, and it leads to a lot of confusion. On the other hand, D3D has more high-level support: loading animated meshes directly off of disc, for example.
Performance-wise, I've seen benchmarks that go both ways. Applications using either API can be optimized to the point where the data gets in to the GPU as fast as it can handle it.
The big selling point, for me anyway, is that I can write an application on a PC and then port it to a Mac or Linux. That's simply impossible with DX. This, of course, is why Microsoft wants to make and keep DirectX as the dominant renderer: to obtain a lock on the technology. I won't comment on that: as a business approach it's a good idea, but it does have a habit of alienating users - and after all, it's the users that keep Microsoft in business.
On 10/30/06, Ryan Gahl <[EMAIL PROTECTED]> wrote:
And as for the re-writing code every release point... if we work with XNA or generally with Managed DirectX... those API wrappers should shield us from future low-level spec changes.
OpenGL, AFAIK, is _not_ comparable to DirectX in terms of either speed or API completeness ( i.e. features). But I guess I'm not certain on that, just going from various readings on the subject...
On 10/30/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:I haven't had the spaghetti code experience with OpenGL, and I have been
working with it for many years. Typically, C++ "object-oriented"
libraries had been the worst to work with; especially since C++ name
mangling is compiler-dependent. However, since .Net eliminates this
problem, I am interested in seeing some good class-based object-oriented
APIs in the future.
By the way, I believe Mono implements .Net's DirectX interfaces using
OpenGL. Using OpenGL directly might offer a performance boost there.
-Sam
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto: [EMAIL PROTECTED]] On Behalf Of Adam Frisby
Sent: Monday, October 30, 2006 12:05 PM
To: Development list for libsecondlife
Subject: Re: [libsecondlife-dev] LSO & CIL compiler
But makes for a mighty mess when it comes to maintainence.
OpenGL ends up spaghetti. I've been there, done that. At the very least,
XNA is fully object orientated which makes things a lot nicer when
managing multiple materials and objects in a single scene.
-Adam
[EMAIL PROTECTED] wrote:
> Unless you enjoy rewriting your code every release, I'd suggest using
> OpenGL. Performance is on par with DirectX in Windows, you get
> cross-platform support, and the API is stable across releases.
>
>
>
>
------------------------------------------------------------------------
>
> *From:* [EMAIL PROTECTED]
> [mailto: [EMAIL PROTECTED]] *On Behalf Of *Ryan Gahl
> *Sent:* Monday, October 30, 2006 9:39 AM
> *To:* Development list for libsecondlife
> *Subject:* Re: [libsecondlife-dev] LSO & CIL compiler
>
>
>
> Or if your trying to maintain the cross platform support that
> libsecondlife already has :-S
>
>
> :-) yea... but for those using Windows, directX would be better... how
> about a generic wrapper over a provider model? If 'nix based, use
> OpenGL, if Windows, use DirectX. ...Or not... :-D
>
>
>
------------------------------------------------------------------------
>
> _______________________________________________
> libsecondlife-dev mailing list
> libsecondlife-dev@gna.org
> https://mail.gna.org/listinfo/libsecondlife-dev
> http://www.libsecondlife.org/
_______________________________________________
libsecondlife-dev mailing list
libsecondlife-dev@gna.org
https://mail.gna.org/listinfo/libsecondlife-dev
http://www.libsecondlife.org/
_______________________________________________
libsecondlife-dev mailing list
libsecondlife-dev@gna.org
https://mail.gna.org/listinfo/libsecondlife-dev
http://www.libsecondlife.org/--
Ryan Gahl
Application Development Consultant
Athena Group, Inc.
Inquire: 1-920-955-1457
Blog: http://www.someElement.com
_______________________________________________
libsecondlife-dev mailing list
libsecondlife-dev@gna.org
https://mail.gna.org/listinfo/libsecondlife-dev
http://www.libsecondlife.org/
--
Tom Wilson
[EMAIL PROTECTED]
KI6ABZ
_______________________________________________ libsecondlife-dev mailing list libsecondlife-dev@gna.org https://mail.gna.org/listinfo/libsecondlife-dev http://www.libsecondlife.org/