ROOT logo
ROOT » GRAF3D » GL » TGLSelectBuffer

class TGLSelectBuffer


 Encapsulates OpenGL select buffer.
 Provides sorting of the results based on z-coordinate of the
 selection hit and can fill the TGLSelectRecordBase records.

Function Members (Methods)

Data Members

protected:
UInt_t*fBufActual buffer.
Int_tfBufSizeSize of buffer.
Int_tfNRecordsNumber of records as returned by glRenderMode.
vector<pair<unsigned int,unsigned int*> >fSortedRecords
static Int_tfgMaxBufSize

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGLSelectBuffer()
 Constructor.
~TGLSelectBuffer()
 Destructor.
Bool_t CanGrow()
static: return true if current buffer is smaller than the max buffer size
void Grow()
 Increase size of the select buffer.
void ProcessResult(Int_t glResult)
 Process result of GL-selection: sort the hits by their minimum
 z-coordinate.
Int_t SelectRecord(TGLSelectRecordBase& rec, Int_t i)
 Fill select record rec with data on (sorted) position i.
 Returns depth of name-stack for this record.
TGLSelectBuffer()
Int_t GetBufSize() const
{ return fBufSize; }
UInt_t* GetBuf() const
{ return fBuf; }
Int_t GetNRecords() const
{ return fNRecords; }
UInt_t* RawRecord(Int_t i)
{ return fSortedRecords[i].second; }