Mohamed Hassan
07-07-2002, 02:28 AM
Hello every body,
First of all let me explain what Iam trying to do.
Iam trying to use color buffers to store the objects names rather than the color. The reason is as follows:
If I use the convension technique of selection and picking, all objects that hit my boundaries will be returned as selected objects. Then I should filter them to know the top most of them according to their depth buffer value. In this technique objects that are completely overlapped by others may be included in the selected list even after filtering them. So, I tryed to use the names instead of colors in the statement
glColor3ub();
Ofcourse the color buffer is filled with colors of objects which are currently displayed on the screen. These colors actualy represent my objects names so I will scan the color buffer for the selected objects rather than the selbuffer[] which are returned from the selection process.
I will be very pleased if any one can help me.
M.Hassan (Mechanical Engineer)
First of all let me explain what Iam trying to do.
Iam trying to use color buffers to store the objects names rather than the color. The reason is as follows:
If I use the convension technique of selection and picking, all objects that hit my boundaries will be returned as selected objects. Then I should filter them to know the top most of them according to their depth buffer value. In this technique objects that are completely overlapped by others may be included in the selected list even after filtering them. So, I tryed to use the names instead of colors in the statement
glColor3ub();
Ofcourse the color buffer is filled with colors of objects which are currently displayed on the screen. These colors actualy represent my objects names so I will scan the color buffer for the selected objects rather than the selbuffer[] which are returned from the selection process.
I will be very pleased if any one can help me.
M.Hassan (Mechanical Engineer)