#### Archived

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

# Clip planes and glScissor question

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

## 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 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

1. 1
2. 2
3. 3
Rutin
22
4. 4
JoeJ
16
5. 5

• 14
• 29
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631775
• Total Posts
3002284
×