Stereosopic Display Log Out | Topics | Search
Moderators | Register | Edit Profile

stereo3d.com webboard » Stereo3D Software Applications » Stereosopic Display « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

mathieu angus (Matthieu)
New member
Username: Matthieu

Post Number: 1
Registered: 2-2007

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, February 09, 2007 - 11:39 am:   Edit PostDelete PostView Post/Check IPPrint Post

Hi, I am novice with the 3D topic .... So excuse my ignorence. I ld like to create stereo view of a object with 2 camera (using openGL and glut). theorically, i might have 2 superposed images but when i execute my program the image is blinking and i can see a switching between the 2 camera pic. i put my code below, thX to let mne know what is wrong

matthieu

buffer type in main function:
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STEREO);

in display function:

glDrawBuffer(GL_BACK_LEFT);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);


glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1.0, 1.0, -1.0, 1.0, 1.0, 30.0);
//glFrustum(-aspectViewport * 0.75 - frustumAdjust,aspectViewport * 0.75 - frustumAdjust, -0.75, 0.75, 1.0, 30.0);
glTranslatef(Disparity, 0.0f, 0.0f);
glTranslatef(0.0f, 0.0f, -2.0f);

// Setup the transformation matrix for the object.
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();

glPushMatrix();
glTranslatef(0.0, 0.0, -2.0);

glEnable(GL_DEPTH_TEST);

drawScene();
glPopMatrix();
glutSwapBuffers();



//glClear (GL_DEPTH_BUFFER_BIT );
cout<<"camera right"<<endl;
//glMatrixMode(GL_MODELVIEW);
glDrawBuffer(GL_BACK_RIGHT);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1.0, 1.0, -1.0, 1.0, 1.0, 30.0);
//glFrustum(-aspectViewport * 0.75 + frustumAdjust,aspectViewport * 0.75 + frustumAdjust, -0.75, 0.75, 1.0, 30.0);
glTranslatef(-Disparity, 0.0f, 0.0f);
glTranslatef(0.0f, 0.0f, -2.0f);

// Setup the transformation matrix for the object.
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();

glPushMatrix();
glTranslatef(0.0, 0.0, -2.0);

glEnable(GL_DEPTH_TEST);

drawScene();
glPopMatrix();

glutSwapBuffers();
Top of pagePrevious messageNext messageBottom of page Link to this message

Michal Husak (Husakm)
Intermediate Member
Username: Husakm

Post Number: 65
Registered: 4-2006


Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, February 12, 2007 - 2:46 pm:   Edit PostDelete PostView Post/Check IPPrint Post

Do you run your code on a Quadro card with disabled consumer level stereo drivers and enabeld OpenGL steresocopic support in drivers ?

Functional OpenGL stereo samples can be found on this link:
http://www.gali-3d.com/archive/articles/StereoOpenGL/StereoscopicOpenGLTutorial.php

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image

Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | User List | Help/Instructions | Program Credits Administration