Doofus runs on Wine!

Doofus on Wine.
Doofus 3D running on Wine!

Just before logging off of the Gutsy, I tried running the 0.0.5 beta version of Doofus 3D via Wine and “Voilà”, it actually ran! On Linux, with no tweaks of any kind, no nothing! Obviously only with the OpenGL driver, Wine has near absent DirectX support so it was only OpenGL, but still I was like blown away. I didn’t even expect it to work and I must say I could see no performance issues. Almost the same speed as Windows. I ran most of the unit tests and managed to finish the first 7 levels without any problems (, didn’t try any more but I am sure they will work just as well). To be frank I didn’t expect the game to run, and I mean run at all, let alone with the same speed as Windows.

I had no idea Wine had no DirectX support. I guess it must be very difficult to port the DirectX APIs (, but who’s complaining when the engine can run on OpenGL just as well) . The engine logs show Wine hooks in the native OpenGL driver on Linux, so I guess there is no visible performance loss while running the game using OpenGL renderer via Wine.

Update (Dec 17th, 2007): After reading Dan’s comments and some experimentation I could in fact run Doofus 3D via the DirectX renderer. However, the DirectX renderer will not run out of the box and there might be other legal issues associated with it, which are as yet unclear. You can read the entire comments here. I like to thank Dan for pointing out the error in the above post, Wine does have DirectX 9 support.

Some recent news updates.

I generally have such an entry every 2-3 months so here goes.

  • Visual Studio 2008 is here!
    Microsoft recently released Visual Studio 2008 along with the Express editions. If you are like me then head on down there and start downloading the express editions, like now!
  • Delayed but good news from AMD/ATI:
    AMD (and ATI) has/have announced the availability of the HD 3870 and 3850 range of graphics cards, widely believed to be an answer to NVIDIA’s 8800 GT and GTS range of GPUs. They are based on ATI’s new RV670 graphics chip. Just how much of a challenge will they be to the 8800 has yet too be seen, but I am guessing we could be seeing stiff competition here. Read details of the spec here and here.

    In other news, very recently AMD also released the Phenom Quad core processor, X4 and the 7940FX chipset. Again to early to say how things pan out. More details here and here.

  • Updates from NVIDIA:
    As you know NVIDIA released Cg 2.0 Beta recently. Along with that two other releases from NVIDIA just rencently; 1) PerfHUD 5.1 and, 2) though I am not working on Cuda, I know some of you are, you can grab the Cuda 1.1 beta.
  • Disappointment in the OpenGL camp.
    As announced recently OpenGL 3.0 specification is delayed due to…. oh well, lets start that again; It seems OpenGL 3.0 has had some last minute changes and the specification release was put on hold. Let me not say anything further, I don’t like getting hate mails.

Cg 2.0 Beta.

NVIDIA has released Cg 2.0 beta a few days back. I downloaded the new version including the docs and was browsing through them. What particularly interested me was the sentence “New OpenGL profiles (gp4vp, gp4gp, and gp4fp) for GeForce 8 extensions” in the features list. It’s a little bit confusing though, because the docs don’t go into how exactly to do that, or is it just some extensions. One another thing that seems a miss is how exactly to access new DirectX 10 features from Cg, or am I missing something? I don’t have a DirectX 10 compatible card so can’t test anything really, but I checked out the examples provided with the SDK and there seems to be no examples for DirectX 10.

The docs mention 2.0 is compatible with 1.5 so  I tried out some of my older test shaders written with previous versions (1.5) and they worked OK. But then again those weren’t pretty extensive.

Response to a rant: Is OpenGL being abandoned?

It is no secret that the gaming industry is dominated by Windows platforms and the API of choice is DirectX. There are some staunch followers of the OpenGL way of life, but their numbers seem to be dwindling rather rapidly. I have read a lot of blogs claiming that OpenGL is better than DirectX or vice-versa. I even got a mail (, or two) from an unknown person recently claiming that my War of the graphic APIs was rather biased towards DirectX. Let me assure anyone and everyone that it is certainly not the case. I am supporting both APIs in my engine and let me say this again, “Both APIs are functionally equivalent. It is not the API that determines the performance of a game, but rather the underlying hardware.”

The email further went on to show some in game screen-shots to claim that OpenGL based games looked better than DirectX games. Now, anybody who has worked on a game that uses either APIs knows how much of a folly this is. “It is not the API that determines how a game looks, it is the artist that creates the content and the engine programmers that provide the technology (, like Shaders/Level Builder/Script support) to the artists which determines how the game looks.” Game design also plays an important role. In any case it’s not the API. The mail didn’t have a valid sender so I could not mail him/her with my response. In any case, Dude, you could have just posted a comment and I would have been glad to respond.

No OpenGL is not dying out. However I am sorry to say, OpenGL is falling behind. It is being increasingly abandoned in favor of DirectX. Don’t believe me? OK read this, at least you believe him. I think I made it pretty clear why that was the case in my earlier post. I am not going to outline the same points again.

The war of the graphic APIs.

OpenGLSo it’s finally here! I mean OpenGL 3.0 update, formerly known as Longs Peak, has officially been announced at Siggraph. Read more about it here. It’s been like way too long already. I know the announcement was made a while back but I didn’t get time to read the details and proposals till this weekend. The Birds Of a Feather(BOF) presentations are interesting and if you are an avid OpenGL follower then they are a must look at. While true and detailed specs are not yet released, the discussion threads do provide some interesting insight of things that can be expected. If you are already a an OpenGL programmer, expect significant changes to the way you worked with OpenGL. The update removes some redundant and archaic practices that have existed in OpenGL for way too long which makes me happy. The last time OpenGL was rewritten was in 1992 and has survived this long arduous journey of hardware updates pretty much unchanged. Some would argue that that the current mechanism of extensions have cluttered the API just too much and can be a pain to work with. I don’t blame them. Lets just hope the new update addresses these and other issues better than the previous versions. Personally I never found extensions too difficult to work with. Generally complaints are from DirectX guys who have switched over to OpenGL and have to adapt to the new way of working with OpenGL.

DirectX 10Talking about DirectX, it’s been quite a while since the release of DirectX 10. It is apparent that DirectX has a clear advantage at the moment on OpenGL with regards to exposing newer functionality. I don’t buy the argument that DirectX is in anyway superior or that matter inferior to OpenGL. Many people have argued this over the years, but the argument is far from conclusive. While DirectX may be able to expose newer and latest functionality faster than OpenGL, the functionality eventually does get exposed via OpenGL too. So to all nay sayers, my response will be, it’s not so much the graphics API but the underlying hardware that determines how well your card performs and how much graphics throughput you get. The O2 Engine abstracts both APIs and through the years of developing the engine I have seen that both APIs are neck to neck when compared to speed. There is no clear winner when comparing the two APIs from a purely technical perspective. While DirectX is more favored one in game development circles, OpenGL is the API of choice in CAD and Science & Research circles, but that is clearly for very different reasons and not speed or performance. What people fail to realize is that fact that DirectX and OpenGL are very similar, more similar than you would think. With the release of the 3.0 update, I think (and this is my personal opinion) that the two APIs will end up being even more similar. The DirectX 10 update fixed shortcomings of DirectX 9 and previous versions and OpenGL 3.0 has addressed issues that were problematic with legacy OpenGL. So in the future, and I hope, there will be little to choose between the two APIs.

This is like a zoomed up API level and technical level picture. Let’s stand back a bit and look at the bigger picture. So DirectX was first of the block, so is it wining the race. At the moment it would seem so. Programmers and developers have already begun working on the API and getting their hands dirty. Hardware for shader model 4.0 has been available for quite a while and is now considered reasonably cheap. It simply means that development houses have already come up with good engines. But there is a catch to all of this. DirectX 10 is only available for Vista machines that could prove to be somewhat of a stumbling block. Now don’t get me wrong, there is nothing wrong with Vista as such, but I can’t understand the sanity in not releasing DirectX 10 for XP! The driver architecture reason given by Microsoft is crap! If they had released it for XP, that would have meant even larger market for games that used DirectX 10. The only reason I can think of as to why this decision was made was because Microsoft wants to push it’s OS on to end user’s desktops. Gabe Newell of Valve Software touched this point recently where he emphatically said that DirectX 10 for Vista was a mistake! I don’t buy into his argument completely. I think users will eventually buy Vista anyways and we have seen this arm twisting by Microsoft before, and it does eventually force people to buy their OS.

The question to ask is, does DirectX 10 offer truly unique graphics than 9.0? The answer is at the moment NO, but eventually YES. You could get similar graphics with 9.0 or OpenGL 2.0. That said the XBox 360 does not support DirectX 10 yet, so cross platform developers are going to stick with 9.0 for a while. While OpenGLversion 3.0 promises a lot, it’s true potential will only be realized when it comes on to our desktop. Also the spec for Mt Evans update that promises geometry shaders is somewhat still to be fully operationalized. So I think it will be after, probably much after, the 3.0 release. The OpenGL committee seems to be slow again as usual. While DirectX 10 games are here, DirectX 9 is not history as yet.

OpenGL Longs Peak. Sooo Loong!

I am an avid follower of OpenGL news as it was the first graphics API (other being Direct3D) I ever picked up. So I must confess I have a little bit of a soft corner when it comes to OpenGL. I thoroughly dislike comparing the two APIs because I consider them equivalent in functionality. However, recent developments in DirectX have put it at a clear advantage as compared to OpenGL. Direct3D implementations (DirectX 10) already support SM 4 with cards like the 8800 (Geforce 8800 GTS from NVIDIA) already hitting the market. That in itself shows how far behind OpenGL is. I have been hearing Longs Peak for too long and either the ARB committee is sleeping or just too lazy off their a** to get anything done. Either way OpenGL has a lot of catching up to do, which is a pity since OpenGL was better designed initially.

The longs peak update does promise a few changes and improvements. For example the buffer objects finally have the necessary improvements like

  • mapping only a specified range of a buffer
  • strict write-only access
  • explicit flushing of altered/written regions
  • whole-buffer invalidation
  • partial-buffer invalidation
  • non-serialized access

most of which are a part of Direct3D implementation already and are available in Direct3D 9.0. These should have been done a long time back.

Longs peak has also introduced an object model. No its not a direct OO approach, but something of an OO approach wrapped inside an C API. While OpenGL can’t be convented directly into an Objec-Oriented library, the committee came to a conclusion that it was impossible to move further without having to work on some kind of object model. I can understand their concerns, but the object model thing looks kinda overly complicated. Whist the exact implementation details will only be known when longs peak is released and the drivers come out, we have to hope that we are not in for a any nasty surprises.

Thats not to say everything is bad. I mean, in the end this may just look like a rant in a couple of months, maybe the spec is really good. I just hope they release the spec soon.