Site hosted by Angelfire.com: Build your free website today!

^/\^ PeaK /\^/\

Mesa OpenGL flies under Linux....Pentium not required


OpenGL...OpenGL...Read All About it



1.1 Background
The evolution of 3D from a highly specialized niche research market funded in the early days by military based research in flight simulators to common hardware found in today's AGP graphics cards and motherboards demonstrates the technology trickled effect that is common to a lot of high technology areas. 3D is a current buzzword and if you happened to have found this link, I would suggest that you read the following 3D primer first. I wish to discuss the issue of device drivers or what is known as the marriage of hardware and the gaming industry's new darling: OpenGL (about a week after I wrote this page, I came across another page that does OpenGL more justice for newbies and non-newbies alike...please check it out

1.2 OpenGL Politics
John Carmack has stirred the pot and should make things interesting for 3D by porting Quake to a OpenGL. This API is broken down into three sections like DirectX (see ATI OpenGL FAQ and ICD/MCD FAQ):

  1. transfromation(CPU)
  2. lighting(CPU)
  3. rasterization(Video Chip)

SGI had long ago licensed Microsoft to use OpenGL and the most logical way to divide the work efficiently was to have a common transformation and lighting layers implemented in software (i.e. setup) while having the hardware vendors marry rasterization aspects in their drivers. Thus the mini-client driver (MCD) was born. It may seem curious to you that OpenGL MCD exists on WinNT first and not on Win95. I think Microsoft figured that they attack the Workstation market by having an OpenGL interface to encourage the porting of Various OpenGL application packages. OpenGL MCD is perceived to be a threat to DirectX. Simple enough.

Like DirectX, the major benefit was the marriage of the last "rasterization" leg of this process with hardware to attempt to provide a real-time gaming interface. The setup and transformation aspects have taken Microsoft years to perfect (and they are good at this stuff) and now they are withdrawing it from Win95. Why ? It will take Hardware Vendors (IHV) much effort to implement the ICD (Installable Client Driver) as each of them must do the transformation and lighting aspects for each piece of hardware. Microsoft should do the right thing and invent the MCD (remember it exists) once and prevent countless hours of toil by having graphics hardware companies . The only good I see is that some of "setup" capabilities will not only be done in software but will take advantage of some of hardware setup capabilities. Microsoft should take a leaf from Richard Stallman of GNU fame said " I was extremely impressed by the sharing spirit that we had. We were doing something that we hoped was useful and were happy if people could use it." There are too many real problems in the world to solve.

1.3 OpenGL and Games

OpenGL has been the workhorse standard in the Workstation world for years. It is robust and and yes...it runs on Linux...albeit only in software form at the moment. John Carmack's offering of a OpenGL version of Quake and his view of a 3D programming has caused a clarification about an API's ease of use versus speed within the industry with regards to APIs. Card vendors I think will need to support both Direct3D and OpenGL.

There are many variants of Quake. The one of most interest would be the version taking advantage of Direct3D. The overall question is visual quality/physics traded off against "fps" speed. The best solution is to engineer the bottleneck to happen simultaneously everywhere in the rendering pipe. In DOS quake and WinQuake, the CPU handles transformation/lighting and rasterization. The amount of data tends to explode at the end of the pipe(i.e. rasterization) , so scaling down the effetcs upstream (i.e. fricition modeling), lighting complexity (i.e. shadows, mirrored images, lens effects in water) has a big impact on the required CPU bandwidth/processing power budget to achieve a certain framerate.

The net effect is that we have blocky textures and 320x200 windows(doublescanned). All the new 3D hardware indirectly gives more options to the game developer or applications person by alotting him the CPU savings gotten from the rasterization stage.

1.4 Better Modeling/Effects in OpengGL Quake

When John Carmack and ID began a program to have their games take advantage of 3D hardware, they targetted OpenGL due to its support of high level abstraction. In the process the better/easier game development allowed for ID to implement and experiment with new features to be cleanly and efficiently coded. The following is taken from Zanshin and highlights the architectural differences between OpenGL version of Quake and DOS/ported DOS-Windows version of Quake.

ID software gives us a glimpse of how much a image can look by taking advantage of the hardware via OpenGL. Porting to Direct-3D would have been much harder....although possible...but also ID to bypass some of the archiectural pipeline inefficiencies in Direct-3D that 3Dfx solved via their GLIDE interface. The overall penalty for Intel CPUs is estimated to be a 25% speed hit. Gee, no wonder John carmack and the principals from 3Dfx/game companies love the proprietary Interface. To get commentary and a great overview on the entire OpenGL controversy where I first learned of this Direct-3D issue see Paul's page.

Some of the new "way cool" 3D effects implemented that are not found in non-OpengGL versions of Quake are:

  1. Reflections:You can see yourself in the stain glass window on the left hallway before you enter select the easy level
    R_MIRRORALPHA 0
    ( Default is 1 for speed but no mirrors)
  2. Water lens effects: modeling of transparency of water
    R_WATERALPHA 0.3
    ( Default is 1 for speed and no transparency)
    R_NOVIS 1 (Default is 0 for speed. It must be set to 1 at same time a above for transparency)
  3. Better shadowing: generate more reaslistic shadowing effects
    R_SHADOW 1
    (Default for speed is 0)
  4. Less Blocky Textures: OpenGL takes advantage of alphablending in D3D or uses CPU cycles for to blend edges hiding staircase effects. Best see when close to a texture surface of object. Below is a list of setting from fastest/blockiest to most detailed/slow
  5. Multi-texture Support:OpenGL support single pass processing of textures for hardware with this feature to speed up processing framerate. To get an idea of the increase in framerate, set:
    R_FULLBRIGHT 1 (Default is "0" so that lighting of textures is properly done.

When they then decided to make money by porting to the Win95 D3D platform they found an ill-birthed coding interface that inflicted pain and discouraged experimentation. They did something with integrity for the gaming industry, by ballking at following the Microsoft game worshipppers eyeing the Win95 game market/$$$, and did not release a version of Quake supporting 3D hardware features via Direct3D. Cool. Because WinNT had already released an MCD to woo users of the mature workstation-based OpenGL market, ID had a very weirdly targetted audience for GLQuake. The good thing about it was that they could use this platform to gauge tradeoffs in deciding which Quake/OpenGL features/instructions to support on a popular platform. Micosoft did an about face and did not release the promised Win95 MCD.

1.4.1 Installing ATI Beta or MCD OpenGL driver

Some clever individuals have GLQuake to be run on advanced 3D hardware by writing a translation layer between the subset OpenGL code emitted by GLQuake to Direct3D. One version is GateGL that somehow manages the above plus the transfomation/lighting portions that are supposed to so difficult to achieve in an ICD/MCD. (Somebody fill me in). The rasterization is taking care of by emitting Direct3D code. Because Direct3D is written at the same or lower level than OpenGL so that the idea of an "OpenGL to DIrect3D translator" or "D3D Wrapper" was born. Microsoft's original vision was to have divide up the work between the game developers and video hardware manufacturers by having the games target D3D and "D3D to hardware" driver portion implemented by the manufacturers for each piece video card.

To Run GLQuake under Win95:

1.5 Speed vs Quality tradeoffs on OpenGL

Microsoft surely could have released something similar, as performance is OK but nothing to write home about. The original wrapper has texture blending implemented but runs a bit slower than the S3 wrapper which does not implement this feature. Bottom line is that GLQuake/Wrapper does not seem to improve upon the WinQuake speed much...the only consolation is that the textures are blended (except S3 wrapper) for better reallism. Reflections are also supported as well water lens effects. For those speed junkies that still do not get it:

  1. GLQuake/3D card/MCD = microsoft dropped the ball
  2. GLQuake/3D harware/wrapper = what MCD might have been or a bit less
  3. GLQuake/3D hardware/ICD = >20-25 fps + more detail/effects

In case [1], gamers expected FPS advantage due to D3D. This might not be true if OpenGL code emitted was low level and volumous and numerous low level floating point transformation/CPU calls were requiired to support D3D calls. [2] sufffers from the above but at least we can commnent about the image quality and framerate in a wrapper worth 50K...how did they do all that in such a small space ??? Even in the best scenario [3], GLQuake's promise is not more framerate but suffcient framerate. The VooDoo has the bandwidth today to turn up the features and still maintain framerate but it has excessive framerate that could/should be traded off for lower price/performance ratios. Even so it is not adequate when more of the OpenGL knobs are turned on (it is sad but there is life after GLQuake called OpenGL apps) with some of the heavier duty workstation OpenGL applications.

Read the primer following on OpenGL/3D hardware by Zanshin and if what he says is true then there are some gaps in the puzzle as to what the above two wrappers have accomplished in a file about the size of 50K.

1.6 ATI's ICD OpenGL for Quake/Quake2

Rage Pro users have recently tested out the ATI's first OpenGL driver running Quake and Quake2. Here are performance numbers based upon framerate for the demo version of Quake running Demo2 via the TIMEDEMO facility:

ATI has released three Beta drivers to date.

  1. Accidentally released Alpha: OpenGL driver with major z-buffering problems released to gauge baseline performance. File glqvxxxx.exe file eleased March 9, 1998.
  2. Beta1: 50% better peformance than pre-release ALPHA driver. AGP cards shown to be performing below that of PCI. Z-buffering problems still reduced by still present. 460K beta1.zip file released March 23, 1998. Used by Anandtech in his CPU/accelerated chipset comparisons.
  3. Beta2: Most z-buffering problems eliminated. AGP framerate on par with PCI cards, now. Released March 30, 1998.
  4. Beta3: Similar to Beta2 driver but Hexen II used to flush out more problems. Final release until full ICD. File releaased on April 16, 1998.

The new Beta[123] OpenGL drivers seem to give roughly a 50% increase in framerate when combined with the new Turbo 2312 Driver on a PCI system. Numbers for AGP system were below those of PCI for the Beta1 release.

CPU

RagePro

Alpha

RagePro

Beta

Riva 128

Permedia

Rendition

VooDoo
(no
windows)

VooDoo
Rush

P2-300

(>25 fps) na 40 [1] 22.2 1] 21.4 [1] 40 [1] 22.4 [4]

P200MMX

P233MMX


P266MMX

na

20.3 [2a]
22 [2b]

25 [3a]

na

na


na

6x86MX-PR200

12.9

na

Table 1: Quake 0.97 TIMEDEMO DEMO2 Results


CPU

RagePro

(alpha)

RagePro

(beta)

Riva 128

3DLabs
Permedia

Rendition
Verite 2200

VooDoo
(no
winndows)

VooDoo
Rush
P2-233(3.5x66)

P2-262(3.5x75)

P2-266

P2-300

na

na

18.3

na

22(beta3/agp)
23.5 (beta1/agp)
na

23.3(beta3/agp)

25.3(beta1/agp)

20[4] 19.4[4] 24.3[4] 31[4] 18.4[4]
P200MMX

P233MMX

P262MMX(3.5x75)

P266MMX

12.5

14.5

na

na

na

12.2(beta1/agp)
19(beta3/pci)
21(beta2/pci)

na

14.8[4] 16.3 21.8 26.3 17.7

6x86MX-PR200

na

9.3[4] 12 13.8 16.3 14.5

Table 2: Quake 2 Demo1 Results



Summary/Miscellaneous Quotes about the ATI OpenGL Driver:

  1. GLQuake 0.97: the framerate is pretty good. Second(Alpha) only to the Riva for cards that can display in a window. The Beta drivers show a 50% improvement over the Alpha drivers for Quake2 but I could not find any quotable sources for framerate under GLQuake. The Riva cards are acknowledged to have display artifacts associated with textures blending. The Rage Pro visual quality is reputed to be better or equal to the VooDoo. I could not find a firm framerate quote while running under a P2-300 for the alpha or beta drivers.

    Quake2 DEMO1 runs at about 75% of the framerate of Quake DEMO2. So tell Tom to not bother with running all the 2000+ experiments using different processors and video chips :)

    On a highend P2-300 machine, the Alpha numbers are about 10% worse than Riva and Permedia but equal to the VooDoo Rush. The Beta drivers added 50% boost punt the RagePro into second place behind the VooDoo. It seems that the VooDoo Rush window mode puts everyone on the same playing field as other chips and the framerate is about the same as the Rage Pro. Is it that multitexture support, that allows texture processing in a single pass (vs two), can only be done full screen ?
  2. The use of Glide to bypass D3d's vertex arrays may give it up about a 25% performance advantage over other equivalent hardware running OpenGL but emitting D3d calls. An ICD will afford the opportunity to bypass this potentially. See 25%

    The RagePro and Riva are hurt equally with weak processors. The Rendition and VooDoo Rush chips do better here and this may be in part a result of ID Software.developing on these platforms and tweaking their engines to perform under weaker CPUs.
  3. Bugs:

    GLQuake: Clipping problems exist due to negative Z-buffer issues: try R_MIRRORALPHA 0.3 on the console. I cannot comment about Quake2 with this turned on. Timedemo of demo1 gets hung on my machine with the sound card going into an endless loop. Workaround is to start a game prior to this recorded sequence gets a chance to load.

  4. Quake2 seems to run a lot smoother than the indicated framerate: I think this may have to be due to the slow down in wide open areas where many triangles exists. I would suggest using a watch to calculate the actual time and number of frames to be sure.

  5. Framerate for the DEMOs seems to be highly variable from one run to another but bimodal in distribution: Could the people seeing these type of variations put a clock on the demo ? The DEMOS generate a fix number of frames and the framerate is generated by dividing this number by the time.

  6. Multi-texture support could provide a speedup for future OpenGL drivers for the RagePro due to the capability of the hardware. Set R_FULLBRIGHT 1 to get an idea of the framerate increase.


Email: peakrchau[at]yahoo.ca

...as of May 15 2004