Thread: OpenGL Viewports

  1. #1
    Registered User Anarchist's Avatar
    Join Date
    Jan 2002
    Posts
    12

    OpenGL Viewports

    I'm writign a 3D pool game, and want to have a plan view of the table aswell as the main 3D view

    is it possable to only draw the scene once and have 2 separate viewports with different camera settings or will I have to draw it for each viewport?

    in pseudocode

    Code:
    create viewport
    setup camera
    
    create second viewport
    set up second camera
    
    draw pool table
    or

    Code:
    create viewport
    setup camera
    draw pool table
    
    create second viewport
    set up second camera
    
    draw pool table
    the only difference is that I draw the table trice on the second one, and I dont think it will effect performance too much, but if it can be drawn once it would be more convenient and give a small increase in performance

    another question
    when opening a window to draw to how do you make sure that the editable area of the window is at for example 640x480 and the window border goes around that?

  2. #2
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640
    Create two camera's, Capture the scene, Convert the captured
    2 scenes to textures, Scale the textures to 1\2 the screen on the
    y axis, Render the textures in the orthographic mode.
    --

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linking OpenGL in Dev-C++
    By linkofazeroth in forum Game Programming
    Replies: 4
    Last Post: 09-13-2005, 10:17 AM
  2. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  3. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 07:57 PM
  4. OpenGL and Windows
    By sean345 in forum Game Programming
    Replies: 5
    Last Post: 06-24-2002, 10:14 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM