Author Topic: Question regarding the openGL port?  (Read 18676 times)

0 Members and 1 Guest are viewing this topic.

Offline Inquisitor

Question regarding the openGL port?
theoddone:

Just saw that you don;t have the game yet, I ran across a couple copies on ebay recently, for less than 20, if you are having a hard time locating it.

And who is "we" ?

:)
No signature.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Question regarding the openGL port?
Quote
Originally posted by theoddone33
http://icculus.org/~theoddone33/files/tricky.png
http://www.icculus.org/~relnev/the_dark_master.png

Screenshots both taken on Linux.

:eek: ;7 :eek:

Quote
Sound and joystick input do not work as of this writing.  OpenGL graphics are done.

Neither of us has the full game yet, so we've been basing our work on the demo. [/B]

Don't have Freespace 2!?
:jaw: :jaw:
Nice work! :yes2::nod::yes:
-C

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Question regarding the openGL port?
why don't all you people put what you've all got together
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Inquisitor

Question regarding the openGL port?
Because we just got a common CVS server about 5 minutes ago :)

That IS the plan Bobboau ;)
No signature.

 

Offline IceFire

  • GTVI Section 3
  • 212
    • http://www.3dap.com/hlp/hosted/ce
Question regarding the openGL port?
Very sweet.....

So let me try and undestand some stuf here :)

OpenGL is a alot easier to understand and presumably implement into FreeSpace 2?  OpenGL could potentially perform faster than Direct3D in FreeSpace 2, if only because FreeSpace 2 is built on DirectX6?

Would this also potentially allow for us to do something like say add bump mapping or specular lighting to the engine without doing any serious damage to the speed at which we can play it?

I'm not expecting anyone to be able to bring FreeSpace 2 up to Unreal Warfare or Doom III leve by any means but I think it'd be cool if we can keep the game running smoothly plus add some graphical enhancements to keep things looking good for a while yet.
- IceFire
BlackWater Ops, Cold Element
"Burn the land, boil the sea, you can't take the sky from me..."

 

Offline Inquisitor

Question regarding the openGL port?
Here's the real trick:

I can check in a vanialla copy of the source, but who;s port in progress should we build from? Guess we won;t know that till we look at each of the 2 ports that are the furthest along.

theoddone and penguin (and vrodic, though I am not sure how far along you got past the GCC compile, and eldrick, just for grins) we need to get together sooner rather than later so we can get your CVS set up and figure out what is what :)
No signature.

 

Offline daveb

  • WHEE!!
  • 25
Question regarding the openGL port?
Quote
FreeSpace 2 is built on DirectX6?


Try DirectX5, sparky  ;)

If I had a say, I'd say to stay with DirectX. Partially because I'm impressed with DirectX 8.1 (how it compares to earlier versions), and partially because every would-be graphics wizard can be overheard to say "OPANGL SI THE BEST! DARECTX IS FOR LAMARS. JOHN CARMACKE USES IT!" if one spends enough time.

And also because I'm just stubborn and refuse to admit to the possible benefits of OpenGL   :)

In seriousness though, you're not going to see any significant speed difference between GL and DirectX, especially with a game like FS2. You'd need to do some serious CPU-side optimizations to the model rendering code before the vagaries of API/drivers start to come into play. Of course, its been 2+ years since I've seriously played with the code, so I could be on crack.

 

Offline Inquisitor

Question regarding the openGL port?
Well, no DirectX upgrade will run on Linux or the PS2, so we have to have something else for at least those parts.

I'm in favor of keeping/upgrading DX for the windows users, if not offering them a choice.

But that's me.

BTW, initial checkin of Voltion source into CVS just finished.

We're in business ;)
No signature.

 
Question regarding the openGL port?
Actually the most valuable thing to do, would be to create an API agnostic renderer for freespace2 ala Quake2, where you simply feed the various render commands to the renderer, and then the currently active  backend (opengl/direct3d) does the appropriate api calls, a lot of games use this approach, even recent ones like Serious Sam. A lot of video cards now have excellent opengl drivers (sometimes better than d3d) while older video cards have much better d3d support, or no real support at all (glide)...

 
Question regarding the openGL port?
Yeah, that's definately the best way to handle the render code.

Inquisitor, like I said in the other thread, either get a copy of the most recent version of the GCC/OpenGL/Linux port or give whoever has that version write access, and have them commit it (perhaps after touching it up to make sure it has a good file/folder structure). IMHO we should use that as the starting point, because it has the most changes. CVS should be able to handle the smaller changes regardless of what the base is anyway, especially because the port changes mostly graphics stuff I don't think anyone else has touched yet :)

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Question regarding the openGL port?
I'd pay $100 to someone for getting fs2 up to DX8
$200, if they were quick about it

now hurry up before I change my mind
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 
Question regarding the openGL port?
Quote
Originally posted by daveb
...In seriousness though, you're not going to see any significant speed difference between GL and DirectX, especially with a game like FS2. You'd need to do some serious CPU-side optimizations to the model rendering code before the vagaries of API/drivers start to come into play. Of course, its been 2+ years since I've seriously played with the code, so I could be on crack.


Just out of curiosity, why is the model rendering code such a...well, mess. There's a lot of weird and unfinished things here. :)

Was Interplay a bit pushy?

 
Question regarding the openGL port?
Quote
Originally posted by Eternal One


Was Interplay a bit pushy?


That's like asking if the sky is blue. ;)

 
Question regarding the openGL port?
Hahah, yes, perhaps a rather stupid question. :)

 

Offline Inquisitor

Question regarding the openGL port?
Trying to get that copy now, Mysterial :)

you'll notice that neither penguin nor theoddone has responded since this news came up :)
No signature.

 

Offline penguin

  • Eudyptes codus
  • 28
  • Still alive.
Question regarding the openGL port?
The bad thing about the OpenGL port (or at least my version, there seem to be a lot floating around)...

Most of the 3d transformations (to screen coordinates) are done by the FS engine itself, and the rendering only displays the 2d polys.  And as I've posted before, OpenGL kinda sux at 2d, so the framerate is very bad (about 3-4 fps on my box).  It would be a lot better to move all the 3d rendering out of the engine and let OGL do it natively.  We would still use the 2d for the UI and HUD overlay, I guess...  Of course this would have to be conditional code, so DX, etc. wouldn't break.

Another idea would be to move all the UI graphics (menus, etc.) to use the "native" rendering -- (Xlib for unix/X, GDI for Win32), so we're only using OpenGL in-game.  But this would be a lot of work, epecially since Xlib has no concept of alpha blending, and IIRC neither does GDI (but it's been a while since I did Win32 programming...)

BTW, kudos to theoddone33 and co... looks awesome, I'm jealous ;)


Inquisitor, I can get you what I have.  It is butt-ugly code, but 3d rendering is about 50% done -- no texturing, so ships, etc. are being rendered as kinda ghost images, but it's almost playable except for the crappy framerate.  Lemme know how you want to handle it, AIM or email me (I just installed LICQ and have no idea if it works or not w/ my firewall, but you can try it too)
your source code slave

 

Offline Inquisitor

Question regarding the openGL port?
Lets all get together and compare notes, penguin :)
No signature.

 

Offline IceFire

  • GTVI Section 3
  • 212
    • http://www.3dap.com/hlp/hosted/ce
Question regarding the openGL port?
So is DirectX 8 stuff available to us....like does Microsoft have whatever tools needed for you guys to try and make that upgrade?  Is that beyond your abilities?

I know im asking lots of questions but I want to try and get a grasp of what can and cannot be done.  I'm about to embark on a new FreeSpace project and source code and MODs is where its at so I'd like to be able to take advantage of and have an idea of what we may be able to do in the future.

Quote
Try DirectX5, sparky

Dizam....I thought it was 6....I guess I lost count :D
- IceFire
BlackWater Ops, Cold Element
"Burn the land, boil the sea, you can't take the sky from me..."

 

Offline daveb

  • WHEE!!
  • 25
Question regarding the openGL port?
Quote
So is DirectX 8 stuff available to us....like does Microsoft have whatever tools needed for you guys to try and make that upgrade?  Is that beyond your abilities?


Yep, you can download the DX8 SDK completely free. The full download is a little large (almost 200 megs) but well worth it. The documentation is excellent.


As far as an API agnostic renderer. That's exactly how FS2 is setup. The high level game code doesn't know whether its in DirectX mode, or OpenGL or whatever. It is indeed handy if you want to be "flexible". However, what I've basically found out over the years is that the agnostic renderer is going to cost you in performance. Not really because of the middle layer, but because every API is slightly different (admittedly, these days they're pretty much all converging to the same feature set) and you're going to be making assumptions to get something working in one API that don't necessarily hold true for another.

For example, if you were to use DX8 you could go full out and create all your vertex buffer and DX8/hardware specific stuff in video memory and work from there. However, there's no analog for that in OpenGL at all (OpenGL likes to "hide" the details from you). So, like in FS2 you write for the common denominator, and do all your transforms on the CPU and use the API as a pure rasterizer.

This brings up a good point. The poster before who talked about OpenGL not being good at "2d" and therefore being slow with FS2 - that's completely untrue. FS2 uses its hardware API (Glide, DX, etc) purely for rasterizing. There should be practically 0 difference between them. I would suggest that the reason your OpenGL implementation is slow is because _you're_ making the wrong assumptions about what the code needs to do and how OpenGL works. That's not meant as a slight - but it illustrates the point very clearly - if you insist on multiple API's you're going to run into ugly roadblocks.

It all comes down to what you want to do with the code. Do you want to take it, possibly make it faster and add a bunch of cool gameplay stuff? If so, stick with Windows, go straight with DirectX 8 and save yourself a _lot_ of time. The whole "we need to use Linux" ideal has always been goofy to me. You're simply not going to beat MsDev for a sleek development environment, you've got a game that works, and DirectX has tremendously useful documentation.

On the other hand, if you just like the idea of porting it to Linux for the sake of porting it to Linux, that's fine. Go with OpenGL and be happy.

But for those who want to actually accomplish something with the game - don't bother. It'll be ages before you see a "useful" OpenGL Linux version and it'll be fraught with incompatibilities and hassles that will hinder your desire to do something with the _game_. You can start right now, this second, doing stuff with the straight up Windows/DX game code. The idea that somehow a Linux/OpenGL port is going to help you is a very silly myth. Cross platform, cross API development is more of a hassle than you need.  Let the OpenGL/Linux guys do their thing, it'll be a fun project. But its going to seriously hold  you back if you're a simple game developer. If you're really ambitious, someone can be updating the underlying Windows graphics code to DX8 silently underneath you, and I _guarantee_ that if its well written it will be every iota as fast as the mythic OpenGL/Linux beast (in either case, as I said before, simply swapping API's is going to get you knowhere - you're going to need a big effort to overhaul the model rendering code)

(wow, this ended up as a rant).
« Last Edit: June 02, 2002, 03:01:29 pm by 700 »

 
Question regarding the openGL port?
Isn't Dave just the best? ;)