Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Render non-ortho perspective OpenGL in a clipped rectangle that is ortho perspective?

  1. #1
    Junior Member Newbie
    Join Date
    May 2015
    Posts
    20

    Render non-ortho perspective OpenGL in a clipped rectangle that is ortho perspective?

    Hi all,

    I want to permit general OpenGL to be rendered within a clipped area. The rest of my GUI however will be orthographic.
    Is it possible to mix and match these? Do I merely do a glPushMatrix/glPopMatrix?

    Thanks.

  2. #2
    Member Regular Contributor
    Join Date
    Mar 2015
    Posts
    296
    It will be very strange to view an obeject drawed in project perspective with objects together in orthographic perspective scene. the front will be shown as a frustum for a box feature.

    of cause, push / pop can seperate the vision of them in a scene. why do you od like that? Im afraid except Picasso there would be no artists to draw a scene like that.

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    2,926
    Switching between orthographic and perspective projection is normally done via the projection matrix (glMatrixMode(GL_PROJECTION) for the fixed-function pipeline). The model-view matrix shouldn't include projective transformations (as that breaks the fixed-function lighting calculations).

    If you're dividing the window up into sub-windows, you may want to use glViewport() and possibly glScissor() (the viewport clips geometry, the scissor rectangle clips rasterisation; the difference matters for points, wide lines, bitmaps, clearing, etc).

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •