Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Biggles

A curious problem

This topic is 6118 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to create a program that generates panoramic images using OpenGL under Linux. I am using a technique that involves taking 8 images 45 degrees apart with a 45 degree frustrum, then pasting the images together to give a 360 degree image. There is some matrix transformation stuff after that to correct for distortion but that isn't important right now. The problem I am having is that when I take the images they always seem to get rendered out of order. This is the code that takes the 8 images:
        for (i = 0; i < 8; i++)                             // Take 8 pictures

    {
        cout << "Taking picture at angle: " << InitialAngle + i*45 << endl;
        mainWidget->updateGL ();
        mainWidget->changeRotation (0.0, i * 45, 0.0);  // Move to next angle

        Images[i] = mainWidget->getShot ();             // Get the picture and store in array of pictures

    }
    
UpdateGL() is the rendering function. GetShot() calls glReadPixels() to get the pixel data from the frame. What I want to know is how to force the images to be rendered in the correct order. It seems that the sampling of the frame happens at the wrong time because sometimes it captures two copies of one image and none of another. But it also doesn't render in the right order, because the frames are displayed as they are rendered and they are out of order. I've tried adding a call to glFlush() in that loop but it didn't make any difference. Can anyone help with this? -------------------- Never eat anything bigger than your own head. Edited by - Biggles on November 14, 2001 9:18:33 PM

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!