We’re trying to create a 3D media center for a car interior with Panda3D. We have an autostereoscopic display, that uses OpenGL quad buffered image outputs to render the two images.
The problem is that when I try to enable “framebuffer-stereo” in the config file, I get an error that it couldn’t get the requested FrameBufferProperties. I got an Nvidia GeForce 9800 GT here which I suppose, doesn’t support Quad Buffers.
But the display comes with an OpenGL wrapper service so that apps that output a quad buffered signal run in the 3D display mode even on unsupported hardware.
This works for a test app I made with the Blender Game Engine with quad buffer enabled.
So can you somehow force the quad buffer mode in Panda3D even if the driver doesn’t support it? Maybe it will work then.
Thanks in advance!
I don’t even know what that would mean. When you set framebuffer-stereo, Panda makes the appropriate OpenGL calls to request a quad-buffer framebuffer. When it says “couldn’t get the requested FramebufferProperties” it means that the driver returned a normal double-buffer framebuffer despite our request.
If you know another way to open a quad-buffer framebuffer, and can provide a patch to our OpenGL code, I’ll be happy to integrate it.
Though, for the record, I haven’t had a problem with nVidia hardware not supporting quad-buffer stereo before. It would surprise me if the 9800 GT couldn’t do it.
I just started with 3D and OpenGL programming so I can’t really provide a patch or something.
Hum, I thought only nVidia Quadro cards support OpenGL Quad Buffers. I read about a software patch for GeForce cards but it was only for the 88xx series or so.
If you are able to get a quad buffer with a GeForce card, what driver are you using?
If I set the depth bits and other stuff in the config file I get the correct Properties except for “stereo=1” which is requested but Panda doesn’t get it. I just need to make the app run in quad buffer mode. The actual stereo stuff should be handled by the wrapper DLL.
So technically I don’t need a driver supported stereo mode, but I have to somehow get Panda to enable quad buffer mode so the wrapper kicks in. At least that’s what I think.
Well, I haven’t really done any comparisons of GeForce vs. Quadro. It could be that every time I tried to open a stereo buffer, I happened to be on a Quadro. If you tell me that the GeForce doesn’t support stereo natively, I’ll take your word for it.
“Quad buffer mode” is another way of saying stereo. So I don’t know how to request quad buffer mode without using the normal stereo API.
It seems that you can enable Quad Buffer support with RivaTuner on GeForce 9000 or below cards, but I guess this would be illegal.
All the wrapper is doing is copying its own opengl32.dll into the application directory.
I tried manually copying the dll to “C:\Panda3D-1.7.2\bin” instead. Now I get the window to open without any FrameBufferProperties errors. But it seems that some OpenGL function doesn’t work properly then. I get errors with invalid operation at line 5516, which is “report_my_gl_errors();”, in glGraphicsStateGuardian_src.cxx, which results in “Deactivating wglGraphicsStateGuardian” and an empty render window.
I’m glad I made some progress but now I have absolutely no idea what to do.
I’m a bit overcharged with this stuff since I’m still a student at university and my co-workers have little to no experience with 3D and stereo programming.
Line 5516 is in set_draw_buffer(), which means it got an error attempting to call glDrawBuffer(GL_BACK_LEFT) or glDrawBuffer(GL_BACK_RIGHT). Not completely surprising, since this is exactly the space you’re meddling in.
I don’t know how to help you get stereo working on your GeForce card. I don’t suppose you can find a Quadro somewhere, or you wouldn’t be trying so hard to get this other card working, right? And you can’t use something like anaglyphic stereo for your development, because you really need to use your autostereoscopic display?
Perhaps the best thing you can do is attempt to get stereo working in a trivially simple OpenGL app that you write yourself. If you can get that going, then you can extrapolate from there what it is that Panda needs to do for the same results.
I talked to my supervisor today and if there really is no way to get it to work with the GeForce I’ll probably get a Quadro card.
Yeah, we can’t use Anaglyph since it is for an autostereoscopic display you don’t need glasses for.
In the documentation of the display it says you just have to call “glDrawBackBuffer” or something like this to get your OpenGL code rendered to one buffer. I can’t quite remember the exact function.
What bugs me is that the application is recognized as a quad buffer app, since the settings GUI and the face tracker do show up. Just the content of the window doesn’t get rendered.
I guess we could just use GLUT and OpenGL alone without Panda but the UX-Team wouldn’t like that.^^
I’ll call the developer from the producer of the display tomorrow and will see if he can help.
My point is that if you can find the way to do it using raw OpenGL calls, then it is possible to extrapolate from that and make it work within Panda.
That would be the easiest way to go about figuring out how to make it work within Panda. Going the other way, by starting with Panda as it is and poking at things at random until it starts to work, is not likely to yield success.
How would I extrapolate it then?
Use OpenGL calls in my app or edit the Panda3D source and recompile it?
I’m fairly new to the whole SDK thing, I learned C and C++ at university but not how to really work with the system and APIs.
Well, it depends on what you discover. For instance, you may learn, in your own application, that you need to make one additional OpenGL call to bind the buffer, and then you only need to add an OpenGL callback to your Panda app to do that. But I doubt it will be that simple.
Basically, you need to figure out what is the right way to render stereo on this graphics card. Once you have figured that out, you then need to figure out what Panda is doing to render stereo. And then you need to figure out how to make B match A. Whether that’s best done by modifying the Panda source and recompiling, or by making additional OpenGL calls in your application, depends on exactly what you find out.
Phew that sounds complicated.
I guess I’ll see if I can get a simple OpenGL app to work first and then I’ll try to find some help.^^