Results 1 to 2 of 2

Thread: render scene twice

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2011
    Posts
    4

    render scene twice

    hi everyone,
    i need to create an application which creates 3D anaglyph images. So i have to build a scene and render it two times, changing only the camera position. I'd like to know if it's possible to do this without having to recall all the methods that create the scene.

    exemple (something like):
    CreateABox();
    CreateASphere();
    renderTheRightEyeView();
    renderTheLeftEyeView();

    instead of:
    SetCameraPosition();
    SetViewport();
    CreateABox();
    CreateASphere();
    ChangeViewPort();
    ChangeCameraPosition();
    CreateABox();
    CreateASphere();

    thanks for your reply. i know it's not so clear but i haven't got much experience!

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: render scene twice

    Basically yes, you do have to explicitly re-send commands for each render.
    There are ways to improve than : buffer objects (containing vertex data or pixel data) can be reused as-is for both renders.

    Display lists should be avoided, as compile time is prohibitive.

Similar Threads

  1. Replies: 2
    Last Post: 03-04-2018, 12:26 PM
  2. Render scene to printer
    By johnnalley in forum OpenGL: Windows
    Replies: 6
    Last Post: 05-25-2005, 03:38 PM
  3. Render a scene into a MemDC
    By xunhuan in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 10-16-2003, 03:42 PM
  4. same scene , different render result?
    By honeyhuang in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 09-27-2003, 04:40 AM
  5. how to render one scene for two (different) cameras
    By hch in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 05-13-2003, 09:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean