Archived

This topic is now archived and is closed to further replies.

Clip planes and glScissor question

This topic is 5154 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I am trying to incorporate two black patches on my screen on the top and the bottom as you would see in movies. Someone suggested to use a scissor box using glScissor. But I am not getting it right. The parameters of glScissor is x, y, width and height, so if I understand it right it should enclose my whole scene in a box which would give me black patches on all 4 sides, right ? But if this is the case it does not happen. Also I was trying to get the same effect using glClipPlane, but if I use the following, whatever value I put instead of 1 in eqn, it clips out everything below y = 0. I know I can move into ortho mode and draw 2 rectangles and move back to perspective. But is there a better way using glScissor or glClipPlane? Thank you.
GLdoube eqn[4] = { 0, 1, 0, 0};
glClipPlane(GL_CLIP_PLANE0, eqn);
[/soure]








<SPAN CLASS=editedby>[edited by - CRACK123 on November 6, 2003 10:40:19 PM]</SPAN>

Share this post


Link to post
Share on other sites
nehe.gamedev.net has a tutorial on rendering inside of a box, if you clear to black, then it would render your scene within a "move type screen", that being two black boxes, top and bottom

Share this post


Link to post
Share on other sites