05-09-2004, 02:21 AM
Hi, I am trying to display 4 different viewports in a window and I want to use a dark line to separate them. Can anyone help? thanks
You can draw lines by passing GL_LINES, GL_LINE_STRIP or GL_LINE_LOOP to glBegin. With a clever modelview and projection matrix, you can draw the lines in screen space coordinates, like this.
glOrtho(-0.5, window_width-0.5, -0.5, window_height-0.5, -1, 1);
...Now you can draw the lines in screen space coordinates, and then you just set the viewports and render them as you like.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.