Stellarium 0.12.2
List of all members | Public Member Functions | Protected Member Functions
StelQGLIndexBuffer Class Reference

Qt-OpenGL index buffer implementation. More...

#include <StelQGLIndexBuffer.hpp>

Public Member Functions

const GLvoid * indices () const
 Get a raw pointer to index data for OpenGL. More...
 
uint maxIndex () const
 Get the greatest index value. More...
 
- Public Member Functions inherited from StelIndexBuffer
virtual ~StelIndexBuffer ()
 Virtual destructor. More...
 
void addIndex (const uint index)
 Add a new index to the end of the buffer. More...
 
uint getIndex (const int which) const
 Return index at specified position in the buffer. More...
 
void setIndex (const int which, const uint index)
 Set specified index in the buffer. More...
 
void clear ()
 Clear the buffer, removing all indices. More...
 
void lock ()
 Lock the buffer. Must be called before drawing. More...
 
void unlock ()
 Unlock the buffer. Must be called to modify the buffer after drawing. More...
 
bool locked () const
 Is this buffer locked? More...
 
IndexType indexType () const
 Get type of indices (16bit or 32bit) More...
 
int length () const
 Returns the number of indices in the buffer. More...
 

Protected Member Functions

virtual void addIndex_ (const uint index)
 Implementation of addIndex. More...
 
virtual uint getIndex_ (const int which) const
 Implementation of getIndex. More...
 
virtual void setIndex_ (const int which, const uint index)
 Implementation of setIndex. More...
 
virtual void clear_ ()
 Implementation of clear. More...
 
virtual void lock_ ()
 Implementation of lock. More...
 
virtual void unlock_ ()
 Implementation of unlock. More...
 
- Protected Member Functions inherited from StelIndexBuffer
 StelIndexBuffer (IndexType indexType)
 Initialize data common for all index buffer implementations. More...
 

Additional Inherited Members

- Protected Attributes inherited from StelIndexBuffer
const IndexType indexType_
 Index type used (16 or 32 bit) More...
 

Detailed Description

Qt-OpenGL index buffer implementation.

Currently, this is a straghtforward index array. In future, it should be replaced with a Qt3D implementation (based on QGLIndexBuffer), or with a direct VBO implementation (although we can still keep this implementation for GL1).

Note
This is an internal class of the Renderer subsystem and should not be used elsewhere.

Definition at line 37 of file StelQGLIndexBuffer.hpp.

Member Function Documentation

virtual void StelQGLIndexBuffer::addIndex_ ( const uint  index)
inlineprotectedvirtual

Implementation of addIndex.

See Also
addIndex

Implements StelIndexBuffer.

Definition at line 68 of file StelQGLIndexBuffer.hpp.

virtual void StelQGLIndexBuffer::clear_ ( )
inlineprotectedvirtual

Implementation of clear.

See Also
clear

Implements StelIndexBuffer.

Definition at line 106 of file StelQGLIndexBuffer.hpp.

virtual uint StelQGLIndexBuffer::getIndex_ ( const int  which) const
inlineprotectedvirtual

Implementation of getIndex.

See Also
getIndex

Implements StelIndexBuffer.

Definition at line 89 of file StelQGLIndexBuffer.hpp.

const GLvoid* StelQGLIndexBuffer::indices ( ) const
inline

Get a raw pointer to index data for OpenGL.

Definition at line 49 of file StelQGLIndexBuffer.hpp.

virtual void StelQGLIndexBuffer::lock_ ( )
inlineprotectedvirtual

Implementation of lock.

See Also
lock

Implements StelIndexBuffer.

Definition at line 109 of file StelQGLIndexBuffer.hpp.

uint StelQGLIndexBuffer::maxIndex ( ) const
inline

Get the greatest index value.

Definition at line 61 of file StelQGLIndexBuffer.hpp.

virtual void StelQGLIndexBuffer::setIndex_ ( const int  which,
const uint  index 
)
inlineprotectedvirtual

Implementation of setIndex.

See Also
setIndex

Implements StelIndexBuffer.

Definition at line 98 of file StelQGLIndexBuffer.hpp.

virtual void StelQGLIndexBuffer::unlock_ ( )
inlineprotectedvirtual

Implementation of unlock.

See Also
unlock

Implements StelIndexBuffer.

Definition at line 110 of file StelQGLIndexBuffer.hpp.


The documentation for this class was generated from the following file: