Log in

View Full Version : OpenGL->DirectX


princec
08-14-2003, 01:31 PM
There seems to be a lot of people writing a rendering abstraction layer and I think this may end up being duplicated effort.

A good glance at the OpenGL API (or even OpenGL ES, which is greatly simplified) will tell you that it's very similar functionally to DirectX.

I believe it should be possible to implement OpenGL cleanly and easily in terms of DirectX. SciTech (http://www.scitechsoft.com) even have an OpenGl 1.4 driver for Windows which uses DX7, 8 and 9.

Now, OpenGL is a big and complicated API. It's got a lot of stuff in it which isn't really necessary at all for games programmers to get involved with. I think that we could create a library that does what we need once and for all and enjoy a bigger audience. In particular it means you can write OpenGL code for the hungry Mac market.

Any thoughts on where to go, the need having been identified...?

Cas :)

Llyod
08-14-2003, 04:59 PM
Yeah... libSDL (http://www.libsdl.org) :P

patrox
08-14-2003, 10:46 PM
Yes it's called PTK, that's what i'm documenting right now.

http://ptk.phelios.com ( still early stages of documentation for now )

Get Ready to port your games on mac at the speed of light :)

Should be available for the end of this week. ( waiting for some agreements from motorola (c) issues and administrative blabla.. )
patrice.

zoombapup
08-14-2003, 11:24 PM
Patrox, are you going to be releasing the source to this? or is it intended to be a lib?

Just wondering, because I doubt I could live with just using a lib. I wouldnt mind paying a bit for something similar, but to be honest, its not worth it for me unless I have the source in case something goes wrong.

Phil.

patrox
08-14-2003, 11:30 PM
The source will be available as an extra fee, but as long as i'm alive i'll fix it ! :)

I don't think anything will go wrong with it really , we've tested it on several games and it has been tuned and fixed since last september. ( we mostly fixed end consumers issues, like operating system behaviour )

Worse case scenario is that you just use the basic framework to open the window and detect the keyboard/mouse. and do whatever you want with the graphics. ( it's C/C++ so you're not stuck like a blitz basic bug or anything ).

The lib won't be a DLL so you won't have an ugly blabla.dll next to your program.


patrice.

zoombapup
08-15-2003, 12:30 AM
The only issue i'd have with that, is that it would be hard to determine where any bug was.

How much would you be thinking of for a source license (just a rough figure).

It'd save me some time, but I'd really need control over bugs and stuff, it'd be a bit hairy for me to accept just a lib file.

Phil.

patrox
08-15-2003, 04:18 AM
I'm quite unsure at the moment.

Probably something in the range of fmod. ( 100/250/4000 )

I still have to figure out that pricing part.
patrice.

Hercule
08-15-2003, 05:53 AM
I don't want to enter in opengl/directX fight, but opengl is a lot simplier than directX, and that's a point every professional agrees. We even say to newbies to start with opengl, and go after that to directX, if they want.
Opengl is far better than directX, but they don't have the marketing team of microsoft (they even succeed to make people believe that directX is faster than Opengl).
Some developp in directX and in opengl, for opengl portability, and for directX marketing benefit.

ggambett
08-15-2003, 05:57 AM
Originally posted by princec
There seems to be a lot of people writing a rendering abstraction layer and I think this may end up being duplicated effort.

A good glance at the OpenGL API (or even OpenGL ES, which is greatly simplified) will tell you that it's very similar functionally to DirectX.

I believe it should be possible to implement OpenGL cleanly and easily in terms of DirectX. SciTech (http://www.scitechsoft.com) even have an OpenGl 1.4 driver for Windows which uses DX7, 8 and 9.

Now, OpenGL is a big and complicated API. It's got a lot of stuff in it which isn't really necessary at all for games programmers to get involved with. I think that we could create a library that does what we need once and for all and enjoy a bigger audience. In particular it means you can write OpenGL code for the hungry Mac market.

Any thoughts on where to go, the need having been identified...?
I'm going to write my own, most certainly. About OpenGL being difficult and complicated (I don't agree), I don't think indie 3D games need to implement the whole functionality! I'll aim for the basic stuff (positioning the camera), rendering primitives (tri strips, fans) and maybe multitexturing but not much more. I guess that accounts for 90% of what an indie needs - what I need, at least. I won't be using shaders to implement stencil shadows and bump mapping just yet :)

I've been doing some research about this. The best I found was the Doomsday Engine (google for it), a Doom-like engine which renders to OpenGL and Direct3D. It's GPL so it can't be directly used, but it can be used to see how can it be done easily.

I know you're part of lwjgl, I guess we belong to the same I-enjoy-developing-frameworks sub-species. I'm interested in avoiding the duplicated effort of designing it, at least (because I know I want it in C++ and you want it in Java :) )

Henrik
08-15-2003, 07:43 AM
Originally posted by Hercule
I don't want to enter in opengl/directX fight, but opengl is a lot simplier than directX, and that's a point every professional agrees. We even say to newbies to start with opengl, and go after that to directX, if they want.

Nope, what most people agree on (including me) is that OpenGL is quite a lot easier to start with and do basic stuff, while DirectX is simpler and cleaner when doing cool things with modern graphics cards, like using vertex and pixel shaders / fragment programs and rendering to textures. Those things are much messier to do in GL, from my experience.

Mike Wiering
08-15-2003, 04:11 PM
In another thread (I don't remember which one) I read that DirectX was recommended because of compatibility issues with OpenGL. I've been working alot with OpenGL lately, but don't have other PC's to test with. Is this very risky? Am I likely to end up with a game that will only work on my own PC? Does this apply to all of OpenGL or only certain functions?

Fenix Down
08-15-2003, 04:16 PM
Originally posted by Mike Wiering
In another thread (I don't remember which one) I read that DirectX was recommended because of compatibility issues with OpenGL. I've been working alot with OpenGL lately, but don't have other PC's to test with. Is this very risky? Am I likely to end up with a game that will only work on my own PC? Does this apply to all of OpenGL or only certain functions?

Here's a related thread:
http://www.dexterity.com/forums/showthread.php?s=&threadid=412