A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.
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
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 http://www.gamedev.net/community/forums/ ask there and you'll probably get a good answer.
Friday, April 21, 2006
This topic is archived. No further replies will be accepted.Other recent topics
Powered by FogBugz