PDA

View Full Version : Where is the OpenGL power?



Mohamed Hassan
11-06-2003, 02:41 PM
Hello every body;
I need to make a selection over a none rectangular region (polygon). I need also to get polygons over lapping.
Can any one help me.
Thanks.
M.Hsn
Mechanical engineer and CAD developer.

virtualchetan
11-07-2003, 04:36 AM
http://fly.cc.fer.hr/~unreal/theredbook/chapter12.html

Mohamed Hassan
11-07-2003, 06:00 AM
Hello,
thank you chetan, but this page doesn't contain more than the conventional way of selection over a rectangular area. I may project all objects and check if they are in the selection region/polygon. I know that this will be slow but it is the only available technique at the present time - at least for me.
Thanks again.

virtualchetan
11-07-2003, 09:27 AM
Hi,

What u can do is define a rectangular area that will contain the actual polygonal area u want to select in. While in GL_SELECT mode, use Stencil buffer, to clip out all objects that are out of the polygonal area, so they will not be drawn into the Selection buffer. Only those which are drawn can get selected.

- Chetan