about separate bar of different views

How can I use OpenGL Command to draw a separate bar to separate different windows shown on the view? (i draw different views using different viewport in the same window, but i want to separate it by a line)

I’ve tried GL_LINES, but it doesn’t appear on the screen.

thanks for your kindly help.

Originally posted by gentlement:
[b]How can I use OpenGL Command to draw a separate bar to separate different windows shown on the view? (i draw different views using different viewport in the same window, but i want to separate it by a line)

I’ve tried GL_LINES, but it doesn’t appear on the screen.

thanks for your kindly help.[/b]

It is hard to guess what the problem is without more information.
Maybe your bars are outside the viewport?
Maybe the depth test failed?

well…i mean, i use 2 quads to separate the 2 views

does this works fine?
glBegin(GL_LINES);
glVertex2f(width/2, height);
glVertex2f(width/2, .0);
glEng();

I don’t know because glVertex seems drawing with the 3D space coordinate while…i need a bar according to the coordinate on the “screen”

Originally posted by gentlement:
[b]

I don’t know because glVertex seems drawing with the 3D space coordinate while…i need a bar according to the coordinate on the “screen”

[/b]

Yes. The standard way is to set your projection matrix using gluOrtho2D.

Originally posted by gentlement:
[b]well…i mean, i use 2 quads to separate the 2 views

does this works fine?
glBegin(GL_LINES);
glVertex2f(width/2, height);
glVertex2f(width/2, .0);
glEng();

I don’t know because glVertex seems drawing with the 3D space coordinate while…i need a bar according to the coordinate on the “screen”

[/b]

http://www.opengl.org/developers/faqs/technical/transformations.htm#tran0030

Excellent.
Thanks so much =)