Creating an OGL stereoscopic wrapper..

I’m sorry if this issue has already been discussed, I know how annoying reposts of similar subjects can be. I attempted to do a search for it, but found nothing.

Onto my question; How would one go about creating, and integrating a stereoscopic driver (Page flipping, over/under [sync doubling] format) for most OpenGL games? Could any such .DLL be run while an OGL game is in progress? Any help would be greatly appriciated.

-Mark

Not sure if I understand. You want to write a driver and support stero glasses?

Support for stereo glasses requires some special chip functionality, and probably a register switched on by the driver will do.
http://www.sgi.com/software/opengl/license.html

there was also a page describing how to write GL drivers.

V-man

Lets say, for instance, I want to add stereoscopic support to a large variety of games, all which use OpenGL for rendering, but none of which (For the most part) have that native functionality. Is it possible to create an “overlord”-type program which could take an existing executing monoscopic game, and dynamically add a left, and right frame buffer? Again, thanks for any help!

-Mark

The absolute easiest solution is to write whatever kind of 3D OpenGL code you want, buy a new GeForce-type card and use the Nvidia stereoscopic drivers. This uses the depth buffer to enable stereoscopic graphics with any OpenGL program, using a variety of different kinds of 3D glasses. It even works with most commerical apps (Quake 3, Anarchy Online for sure) and isn’t all that much slower than mono mode.

So the quick answer to your question is yes, it can be done. I have no idea how to go about doing this at such a low level (drivers rather than source code) though.

It’s just too bad that many people don’t own an nVidia TNT-based card, or better. Plus, who knows if ATI is going to write stereoscopic drivers too(They should). As for writing drivers, I don’t want to get that low level. I would prefer it to be a generic kind of “wrapper” for any 3D card that supports OGL (Well, at least as many as possible). I’ve seen some programs do it in D3D, and some in OGL, but most seem fairly outdated. Thanks!

-Mark

Here’s one path that I believe proves existence of a solution (although performance probably can be optimized):

  1. Implement your own opengl32.dll which exports all relevant OpenGL entry points. This implementation will internally load and use the actual opengl32.dll implementation. Look at the code for GLTrace.dll to see how to do this.

  2. Record all calls and all data passed to your implementation when the application passes it.

  3. On SwapBuffers, re-play the recorded data into both a left and a right buffer.

Sounds good! I’ll look into it. Thanks!

-Mark

Just one more thing … Where can I get the source for GLtrace.dll? Thanks!

-Mark

Nevermind! Sorry!

-Mark

This technuiqe either has a huge memory overhead or is not generally applicable… vertex arrays can disappear… so you’d have to stick with direct mode. But games dont do that.
jwatte, on the first sight i read some irony from your post, is that correct? anyways.

Originally posted by madcowsdiseased:
[b]How would one go about creating, and integrating a stereoscopic driver (Page flipping, over/under [sync doubling] format) for most OpenGL games? Could any such .DLL be run while an OGL game is in progress? Any help would be greatly appriciated.

-Mark[/b]

http://www.stereographics.com/html/body_stereoenabler.html

> jwatte, on the first sight i read some
> irony from your post, is that correct?
> anyways.

My favourite Simpsons quote:

“Are you being ironic?”
“Man, I don’t even know anymore!”

Anyway, I believe my point was that you CAN do it (with some performance/overhead implications). Whether you think it’s WORTH doing it is up to you to decide, not me :slight_smile: