PDA

View Full Version : Is this simple?



scjo82
01-01-2008, 03:20 PM
Hi,

I'm Joachim from Germany.
I've got to write a small program. First I want to know is it possible and second is it complicate. I have never written a program with OpenGL before, so I'm really new in this.
Until now I have not much read about OpenGL, I just wanted first to know: Is it possible? Would it be complicated? Maybe: How long would it take fro a real newbie t write it? ... Maybe someone has some tricks and good links to good information. ...

My small program should be written in Java on an Linux system. And it should work like this:

-> displaying "stereoscopic graphical material"

-> function to switch on and off the stereo-view (simply switch to one of the both pictures)

-> "normal-view" and "stereo-view" it should be possible:
* to zoom in and out
* scroll the display window

-> just in "normal-view":
* rotate the whole picture
* to switch on the stereo-view (first automate rotate to the stereo-position and then switch it on)
* a kind of toggle-view: just in "normal-view" switching the display of the two pictures (maybe by the hit of a key)

Thats all what the program should do.
Just as a comment to this:
- it will be run on a debian system
- this has a "stereoscopic Monitor" with "circular polarization"

I hope someone knows a bit about OpenGL with stereoscopic displaying and can help me a bit.

Many thanks to all who read my bad English and want to help me.


best regards from Germany
and "Happy New Year"

Joachim

HenriH
01-01-2008, 07:52 PM
Hello Joachim, I'm Henri from Finland.

I am not quite sure what you mean by "stereoscopic graphical material" exactly, but yes, as far as I understand, OpenGL does indeed have a support for stereoscopic rendering. There are multiple OpenGL bindings for Java. Check out, for example the JOGL library (https://jogl.dev.java.net/) and LWJGL (http://lwjgl.org/).

Your program does not seem to be overly complicated, but as I have no prior experience of stereoscopical rendering (I have never studied it), I can't tell how long it would take to implement.

You said, you have no previous experience about OpenGL? There are many good sources in the Net to learn about OpenGL in general. A solid place to start is the OpenGL specification, but it is very technical and thus might not be the best for a complete newbie.

For general learning material about OpenGL, check out NeHe (http://nehe.gamedev.net/), althought those are in C. Also, many other resources exist, just try Google.

I hope this was of some help to you.

scjo82
01-02-2008, 05:04 AM
Thanks, that would help a bit for the moment.

I mean with the term "Stereoscopic graphical material", that I have simply two JPEG-pictures, which are already stereoscopic (these are stereoscopic satellite photos).

I don't want to render something. I just have to write a program to view these pictures on a special display. I know that there was already on my system a program, which could display the pictures.

I try to find out how I can use OpenGL for my purposes.

regards from Germany

Joachim

Zengar
01-02-2008, 09:26 AM
AFAIK, OpenGL does stereoscopy by rendering two shifted images on the screen, and the user has to wear special glasses. I have absolutely no idea how your special display works. If your graphics card can "deal" with such monitors, then maybe, it will provide OpenGl support for them (for example, if you request a rendering context with stereo support, it will automatically manage the left and right images for your monitor). Your best bet woudl be to look for some OpenGL stereo demos and trying to run them on your machine, then you can see what happens. Also, you will probably need a special (workstation) graphics card, AFAIK no consumer graphics card support stereo rendering (please correct me if I am wrong!)

jwatte
01-03-2008, 12:43 AM
The biggest problem might be to get the display hardware, the graphics card, the Linux driver, and the Java GL binding to all talk to each other. Once that's done, drawing the stereoscopic data "should" be easy, especially since it's just an image.

I would guess a day to research the hardware, a day to hack up a program, and about a week to debug the hardware interaction. If you know Java and 3D graphics, but not OpenGL, then I would add about two weeks of learning the GL graphics pipeline and API. If you don't know 3D graphics at all, then all bets on estimates are off :-)

Jan
01-04-2008, 07:01 AM
Doesn't OpenGL provide LEFT and RIGHT buffers to render to?
glDrawBuffer (http://wiki.delphigl.com/index.php/glDrawBuffer)
Though it seems you need to create a "stereoscopic" render-context to get LEFT and RIGHT buffers. Google should help you find out how to do that.

When you have a workstation gfx card and the correct driver, shouldn't it handle sending the data to the monitor appropriately?

If yes, it should be enough to enable rendering to the left buffer, render a fullscreen quad with the first image, then enable rendering to the right buffer, render a fullscreen quad with the second image and then display the result on screen.

Note that i have absolutely no experience with this whatsoever and am only guessing here. My first step would be, to ask all people at your Lehrstuhl (it's for university, i guess?), what they know about the hardware, maybe someone has done this before.

Good luck,
Jan.