The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

OPenGL and culling unwanted vertices


I'm trying to come up with a set of custom widgets that will be rendered using OpenGL (No 3D stuff - just 2D).

How can I restrict the drawing area of a child widget to the region alotted for it? For e.,g., lets say that my child widget is a rectangle (-0.3, -0.3, +0.3, +0.3). I want to ensure that if it draws a line from (-0.3, 0) - (+0.7, 0), the line gets clipped to (-0.3, 0) - (+0.3, 0). I have a faint idea that glFrustum does clipping, but I'm obviously doing something wrong because the line just doesn't get clipped!
Tuesday, April 18, 2006
You need a Scissor object for that, I think. Besides an RTFM. ;)
Tuesday, April 18, 2006
Does anyone know any good FMs for OpenGL.
I have the red book of course, but for anything more, most of the other books are aimed at simple intro game programming (presumably that's where the college course market is)

Is there a good advanced openGl guide?
Martin Send private email
Tuesday, April 18, 2006
ping, Thanks!
Tuesday, April 18, 2006
Let me see. Long time since I've done OpenGL, but I think what you need can be achieved by using the stencil buffer, but I could be horribly wrong.

There's a fairly helpful OpenGL Forum at ask there and you'll probably get a good answer.
David S
Friday, April 21, 2006

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz