PDA

View Full Version : OT: Doom3 & OpenGL & Xbox



passalis
05-15-2003, 07:46 AM
I've read recently in gamesdomain that carmack confirmed that doom 3 will be ported to Xbox. That means either two things:
1) Carmack will write down a D3D renderer for the nv25 code path of doom3
2) Carmack will use the nv25 Opengl code path as is (with some logical changes since xbox has a differnet memmory architecture with PCs). But in that case it would mean that xbox would run an opengl game.

I thought that MS forces everyone that makes games for Xbox to use D3D.(technicaly I think there is no reason why not to use GL, I guess nvidia can easily provide the driver) So this time, is MS going to make an exception? Does anyone have any more info about it? If OGL games start to show up in Xbox that would be a really good think for OgL itself.Also if you visit slashdot you will find many links for a new hi-res trailer of D3.
(In that trailer,in the beggining it shows carmack coding something and you can see clearly some "typedef struct" stuff in the monitor - remember the C/C++&Q2 post a couple of days back? Hehe, just mentioned it lets don't start again)

And sorry in advance if someone considers this post off-topic

George Passalis

Zeross
05-15-2003, 07:59 AM
Words from John Carmack though a bit old :


IGN Xbox: What do you think are the chances of Microsoft actually supporting OpenGL on the Xbox, and why?

John Camack : Last I heard, Nvidia was going to be providing OpenGL for it.

IGN Xbox: I have to ask -- can we expect Quake or Doom-ness on the Xbox?

JC: If MS provides an OpenGL, we would probably consider doing a simultaneous development as we will with mac and linux. If not, we will probably still port after we are finished, assuming all the Xbox plans actually come to fruition.

So I think that OpenGL is available to Xbox programmers http://www.opengl.org/discussion_boards/ubb/smile.gif



[This message has been edited by Zeross (edited 05-15-2003).]

Won
05-15-2003, 08:06 AM
Well, you can certainly spin this thread to be on-topic, but how do you do so without making it a D3D v. OGL flame war?

Personally, I would think that he would just do a D3D version. There are two big related reasons why Carmack uses OpenGL, neither of which are necessarily applicable to the X-box

1) Ease of prototyping. The console port is not going to require nearly as much tweaking as the various PC versions did with its multiple rendering paths.

2) Exposure to hardware. Vendor specific extensions provide unique fast paths to different types of hardware. The version of D3D for the X-box already does this.

I wouldn't go and expect MS to start embracing OpenGL anywhere. OpenGL has a pretty unassailable position on every other platform, though, so maybe that means it will stick around in Windows, too. There's alot of OpenGL legacy lurking about that MS would be foolish to ignore, but they could potentially direct the future market as they please. They might be successful in the professional market as they are for games.

-Won

JelloFish
05-15-2003, 08:06 AM
I highly doubt MS would want to support an Xbox OpenGL, I would imagine they are more concerned with moving the technology forward, rather than having to simultaniously develop the technology for two drivers. My understanding of it is the D3D for the Xbox has some extensions that make it very similair to RegisterCombiner+TextureShader OpenGL. So it probably wouldnt be too hard to make a very thin OpenGL layer for XD3d.

Won
05-15-2003, 08:08 AM
Zeross -- Yeah, I heard the same thing, but that claim has since been more or less refuted by NVIDIA. I think I read it on this board, in fact.

-Won

JelloFish
05-15-2003, 08:08 AM
Also im sure if you looked hard enough you could find at least 1 other game using OpenGL on the Xbox.

JelloFish
05-15-2003, 08:13 AM
2) Carmack will use the nv25 Opengl code path as is (with some logical changes since xbox has a differnet memmory architecture with PCs). But in that case it would mean that xbox would run an opengl game. <-- how is its architecture any different than the PC? Except that the memory is unified and faster?

Arath
05-15-2003, 08:35 AM
Hi,

I work everyday on a XBOX kit so I can tell you that there is no OpenGL support (hey it's microsoft's console). But the special DirectX version has some new functions to completly use the nv2A. Funny as those functions look like nvidia extensions.... Also I am agree with Won, why John Carmack should want to use OpenGL on XBOX despite of an easy port from the PC version? BTW I'm not sure that JC will always use OpenGL ... he choose this API because it was the best (I can't find the interview sorry).

Cheers,
Arath

dorbie
05-15-2003, 08:53 AM
Let's speculate for a second on what conversation might have happened between Microsoft and id despite Arath's lack of OpenGL.

Carmack: "If you give me an OpenGL library on XBox we'll show Doom III in time for E3."

Microsoft: "Here you go."

I don't know for sure but I expect OpenGL is available on XBox at least to some developers.

Robbo
05-15-2003, 09:06 AM
Well my guess is that Microsoft will have to do some work on the OpenGL ICD in any case for Longhorn. If the GUI is now going to be hardware accelerated, it will have to sit comfortably with OpenGL acceleration, otherwise a whole heap of applications won't work.

I expect to see an update OpenGL ICD eventually.

passalis
05-15-2003, 09:17 AM
1) JelloFish wrote: "how is its architecture any different than the PC? Except that the memory is unified and faster? "

I just said that because in PC you have to design your application keeping in mind which data will be static (so you can send them once to the card) and which are are not. I guess in Xbox this doesn't make any difference so I would expect some changes on the code for this reason. Its just a thought!

2) My personal opinion is that MS provided the OGL driver to Carmack, but probably made a deal that when doom3 will come out for Xbox, it won't mention anything about ogl anywhere :-)
Or maybe they exchanged OGL support for Xbox, with a D3D code path for the PC version. Who knows!!!!!

Won
05-15-2003, 09:48 AM
Robbo -- Actually, I have a feeling that Longhorn and DX10 are going to be coincident releases, and that DX10 is going to be MS's bid to push OGL into the margins. Would MS bother with any more ICD development? They pulled out of the ARB, remember? They'll probably only do the minimum to achieve backwards compatability. That's one simple way MS could use their leverage against OpenGL.

Also, I'm going to hazard the guess that the NV25 code path wouldn't be very hard to port to D3D, and could probably be accomplished by some non-Carmack person(s). The rendering engine is clearly modular already, so I would infer that the interface consists of basically passing in vertex buffers and shaders, which D3D can handle about as cleanly as OGL.

Like other posts in this thread this is basically speculation, but that doesn't mean you shouldn't justify it.

-Won

wis mak
05-15-2003, 10:20 AM
I want to know why you guys cannot immagine that John Carmack knows Direct3D. He is genuis.

Coconut
05-15-2003, 10:39 AM
Originally posted by wis mak:
I want to know why you guys cannot immagine that John Carmack knows Direct3D. He is genuis.

I can tell you why. If he is a genius, how a non-genius like me can understand or know everything he knows. Of course, if he is not a genius, your conjecture is false.

knackered
05-15-2003, 10:49 AM
Quake3 was converted to every format under the sun (like ps2, dreamcast, xbox) by Bullfrog. I expect the same will be done for Doom3. It really has little to do with ID software, more to do with their publishers.
The idea that MS would introduce a new graphics API into their devkit for one game is, at the very least, laughable.

[This message has been edited by knackered (edited 05-15-2003).]

dorbie
05-15-2003, 10:51 AM
Nobody said he doesn't know D3D. The incremental knowledge to understand a different set of entry points would be easy for most of us, especially since D3D has become more of a copy of OpenGL than anything else.

dorbie
05-15-2003, 10:58 AM
knackered I agree, but the idea that they would have some version of OpenGL bindings since it's an NVIDIA graphics implementation that already has OpenGL drivers written that was available on request and under NDA is not so laughable.

Either way it doesn't much matter, we know it's technically feasible to port it to D3D and we know Carmack said id would port if he had to. I'd guess a port would be pretty quick & simple the way Carmack puts all his graphics calls in a separate dll with his own entry points wraping it.

Gooberius
05-15-2003, 01:23 PM
Firstly, Carmack knows (or has some knowledge of) D3D, it's not like it's hard work keeping up with both API's if even a moron like me can do it http://www.opengl.org/discussion_boards/ubb/wink.gif. And on the XBox there's a lot of stuff that looks like nVidia GL extensions in a D3D style wrapper, so nothing too taxing to get your head around.

Secondly, with such a high profile game as Doom3 I'd be very surprised if Microsoft didn't appoint a couple of their own programmers to do (or help with) the port for id. It's worth a hell of a lot of money and kudos to MS to get Doom3 on their console, so they're going to go out of their way to make sure it happens.

Or so I reckon http://www.opengl.org/discussion_boards/ubb/smile.gif

AdrianD
05-16-2003, 07:04 AM
besides: does anyone remember the times where quake(later GLquake) came out ?
there was no HW-openGL support at all(at cosumer level).
so carmack did his own OpenGL implementation. it was the so called "miniGL" for 3dfx-cards only(as a wrapper for glide...)

so now, he could just simply thake this old piece of OpenGL-code and rewrite it for D3D.
in this way there where no need to rewirte any piece of Doom3-source. he just need to hire some smart guy for extending/porting this wrapper, and voila! the Xbox-port is done!
(i am assuming that the sound/io-part in Doom3 is allready wirtten in D3D anyway...)

knackered
05-16-2003, 07:30 AM
This is all minor detail - which API he uses to send the triangles to the card with whichever shader enabled is minor detail. Like a weeks worth of work, if that. It's the research he's done into fast shadows and geometry reduction using normal maps, the algorithms etc. that has taken up the dev time of doom3, not selecting what OpenGL calls to make. If you look at his .plan's, you'll see he's able to drop in new render paths for new extensions and even API's (such as GL2) in a negligable amount of time.

titan
05-16-2003, 09:55 AM
Originally posted by AdrianD:
besides: does anyone remember the times where quake(later GLquake) came out ?
there was no HW-openGL support at all(at cosumer level).
so carmack did his own OpenGL implementation. it was the so called "miniGL" for 3dfx-cards only(as a wrapper for glide...)

so now, he could just simply thake this old piece of OpenGL-code and rewrite it for D3D.
in this way there where no need to rewirte any piece of Doom3-source. he just need to hire some smart guy for extending/porting this wrapper, and voila! the Xbox-port is done!
(i am assuming that the sound/io-part in Doom3 is allready wirtten in D3D anyway...)


The sound/IO would be written in DirectX, not D3D, specifically the subsets of DirectX called DirectSound and DirectInput.

I belive 3dfx wrote their drivers, not id. Although John Carmack did contribute a little bit to the G400 linux driver.

The Xbox has 64megs of RAM. Doom3 is going to require 256megs I assume-with a 32meg video card (although 512/128 will be the recommended system?)

When you port to a console you don't just recompile your code, and add a wrapper or two. If it was just that the GameCube would be a better target than the Xbox as its API is very much like OpenGL.

Remeber, Doom has been released for the Atari Jaguar, Nintendo 64, Sony PlayStation, and Sega Saturn. Quake has been released for the Saturn, N64, and Playstation. Quake2 came out on the Playstation and N64.

DoomIII will be out for the GameCube, Playstation2, and Xbox eventually. It'll just be a bit different than the PC version in order to fit into the memory those systems have.

Pentagram
05-16-2003, 11:46 AM
I don't think D3 will ever work on ps2 tough http://www.opengl.org/discussion_boards/ubb/smile.gif
One texture unit with a maximum size of 128*128 wont do it I'm afraid.
And gamecube is that powerfull enough?? All the games for it seem to use some easy shaders and some blending.

Charles

tfpsly
05-20-2003, 09:17 AM
The GameCube has a nice hardware (8 texture units, etc...) but has the classical major Nintendo problem : only 64mb of memory for both the game and the textures (there is an additionnal ?6mb? buffer for the sound).

If Doom3 was to be ported on the gcn, th textures would have to be cut down for 1) max size = 512x512 and 2) memory consumption.

DopeFish
05-20-2003, 09:27 AM
Originally posted by Won:
Would MS bother with any more ICD development? They pulled out of the ARB, remember?

They also advertised publicly looking for OpenGL driver developers

jwatte
05-20-2003, 01:38 PM
tfpsly, I think you're off on the GameCube memory size. I believe the X-box has the most memory, with 64 MB of shared main/video memory.

I believe public records show the GameCube to have 24 MB "main" memory and 16 MB "ARAM" which can be used for very fast storage/paging.

titan
05-20-2003, 06:54 PM
I meant "Doom3" will come to all consoles where a profit can be made, not that id's Doom3 engine or art assets will be part of that "Doom3" http://192.48.159.181/discussion_boards/ubb/wink.gif

In addition to the 24megs of fast psuedo SRAM and 16megs of slow "ARAM" the GCN has 4megs of embedded really fast psuedo SRAM for the frame buffer/depth buffer/texture cache (which works like 3dlab's virtual memory for its cards). It can apply up to 16 textures per pass (2 cycles, 1 cycle if you use <= 8 textures). It also supports DXT1 compression. The 16 textures/pass is really useful given the lower geometry throughput the console has.

I expect it is flexable enough to handle id's DoomIII, albeit by dropping the highest mip maps and by probably using lower poly counts.

tfpsly
05-20-2003, 11:51 PM
> I believe public records show the GameCube to have 24 MB "main" memory

Oups, you're definitely right! And our development kit and the real gcn doesn't have the same amount of memory - for debugging purpose I'd say. Sorry for the mistake. A D3 like game port would be quite impossible - textures + normal maps + physic engine + ... in less than 24mb, hem quite hard. Accessing the micro-dvd several times per second is not a solution, so... forget it ;-)

Robbo
05-21-2003, 06:46 AM
Originally posted by DopeFish:
They also advertised publicly looking for OpenGL driver developers


I think the point is, the ICD really isn't all that much to do with the ARB. If I remember correctly, the ARB are those who discuss and set the standard which compliant drivers must adhere to. The ICD allows the Software Developer to interface nicely with those drivers. Presumably, Microsoft need to know the standard, but don't really need input into it.

In my opinion, the ICD will need updating for Longhorn, if GDI is not going to basically be a D3D render target. I'm guessing OpenGL will become a wrapper around D3D. How they get around the proprietary extensions is an issue I expect them to put into DirectX for release 10 anyway - so I'm guessing a complete wrapper will be possible by then anyway.

knackered
05-21-2003, 07:42 AM
Are you suggesting they may put an extension mechanism into directX 10?
That would be a very good move.

dorbie
05-21-2003, 08:00 AM
A wrapper would require more engineering from MS not less, they do nothing right now. The only thing they provide today (and I don't think they even ship the software path now) is an incomplete list of entry points and SGI helped them with that the last time they were persuaded to release it, they haven't touched it in years. Their contribution to OpenGL used to be showing up at the ARB and voting abstain between games of minesweeper. A wrapper would be prone to bugs and controlled by Microsoft, people remember the MCD debacle, it won't happen. I don't think they can even do this and call it OpenGL. It would have to come from the vendors AFAIK. Why would vendors give up on their OpenGL driver investment? It makes no sense, there will be OpenGL applications and customers who use them will insist on world class implementations, a wrapper would almost certainly fall short of that.


[This message has been edited by dorbie (edited 05-21-2003).]

Robbo
05-22-2003, 12:31 AM
What you say is true Dorbie, but I'm thinking in terms of Longhorn and the D3D GDI desktop. To be sure, my mind goes into micro-warp mode when I try and imagine an OpenGL render context embedded in a D3D window.

V-man
05-23-2003, 08:30 AM
I dont know if this ICD mechanism is really important. I think it's easy for IHV to ditch it and come up with something private, yet shared among all IHVs.

All you need is a new opengl32.dll and some entry in the windows registry.

MS is a middle man. You can install non WHQL certified drivers anyway. The only thing MS could do is try to block this kind of effort.

I remember the times of Netscape 4.x where it crashed and you get that message box "close or debug" and no matter how many times you pressed close, it would not go away. Trust me, that's not normal!

Too bad I dont work on the driver side of things. I would make MS run for the hills if I could.

fresh
05-23-2003, 02:03 PM
It's not that hard, guys. Carmack probably hired some programmer to move the DRAWING code over to D3D. All the "difficult" code (HSR, shadow volumes, VSD, etc) is cross platform I'm sure. All the actual rendering calls are probably in a few source files.

Hell, somebody ported Q3A to the PS2. Moving from OpenGL to D3D is child's play in comparison. It also makes good business sense b/c now when you license the D3 engine you get Xbox compatibility.

jwatte
05-23-2003, 04:23 PM
"not hard" to cram a game that reportedly needs a 512 MB machine and 32 MB graphics card into a box that only has 64 MB total, to share?

fresh
05-23-2003, 05:36 PM
Originally posted by jwatte:
"not hard" to cram a game that reportedly needs a 512 MB machine and 32 MB graphics card into a box that only has 64 MB total, to share?

Then how did Q3A fit on the PS2 which has no multitexturing capabilties, no SRC*DST blending, 4mb of vram and 32mb of slow system memory? Not to mention the horrible 300mhz processor and the fact that you need to clip your polygon.

Porting D3 from PC to Xbox should be a walk in the park in comparison. I'm sure they'll have to shrink their textures and cut other corners. On the Xbox you also have the harddrive at your disposal, which can help a lot for dynamic loading.

jwatte
05-23-2003, 08:04 PM
I'm not saying it's impossible; I'm just saying it's hard.

Having actually been through the excercise of looking at what it would take to cram a PC OpenGL product into the Xbox foot-print, I feel I can speak with a little bit of authority on the subject. (Not having actually done the cramming leaves it at "a little" ;-)