Syslock
06-12-2001, 06:56 AM
How can I determine the exact size of the selection buffer that I need to
pass to the function glSelectBuffer?
I've seen in many demos that people just pick an arbitrary number like 64,
256, or 512. But this is prone to error, so I do not want to do it this way.
I thought at first the size related to the number of names I assign with LoadNames,
so if I want to select 5 objects, I would create a selection buffer that is
5*sizeof(UINT). But this is not correct as the number of hits returned is
always -1, indicating an overflow.
So, how do I determine its correct size based on the geometry that I want to
select?
pass to the function glSelectBuffer?
I've seen in many demos that people just pick an arbitrary number like 64,
256, or 512. But this is prone to error, so I do not want to do it this way.
I thought at first the size related to the number of names I assign with LoadNames,
so if I want to select 5 objects, I would create a selection buffer that is
5*sizeof(UINT). But this is not correct as the number of hits returned is
always -1, indicating an overflow.
So, how do I determine its correct size based on the geometry that I want to
select?