Stellarium 0.12.3
List of all members | Public Member Functions
StelQGL1ArrayVertexBufferBackend Class Reference

OpenGL 1 vertex array style VertexBuffer backend. More...

#include <StelQGL1ArrayVertexBufferBackend.hpp>

Public Member Functions

void draw (class StelQGL1Renderer &renderer, const Mat4f &projectionMatrix, class StelQGLIndexBuffer *indexBuffer)
 Draw the vertex buffer, optionally with index buffer specifying which vertices to draw. More...
 
- Public Member Functions inherited from StelQGLArrayVertexBufferBackend
virtual void addVertex (const void *const vertexInPtr)
 Add a new vertex to the buffer. More...
 
virtual void getVertex (const int index, void *const vertexOutPtr) const
 Get a vertex from the buffer. More...
 
virtual void setVertex (const int index, const void *const vertexInPtr)
 Rewrite a vertex in the buffer. More...
 
virtual void lock ()
 Lock the buffer. Must be called before drawing. More...
 
virtual void unlock ()
 Unlock the buffer. Must be called to modify the buffer after drawing. More...
 
virtual void clear ()
 Clear the buffer, removing all vertices. More...
 
void projectVertices (StelProjector *projector, class StelQGLIndexBuffer *indexBuffer)
 Use a StelProjector to project vertex positions. More...
 
int length () const
 Get the number of vertices in the buffer. More...
 
PrimitiveType getPrimitiveType () const
 Return graphics primitive type formed by the vertices of the buffer,. More...
 
- Public Member Functions inherited from StelVertexBufferBackend
 StelVertexBufferBackend (const QVector< StelVertexAttribute > &attributes)
 Construct a StelVertexBufferBackend, specifying attributes of the vertex type. More...
 
virtual ~StelVertexBufferBackend ()
 Required to ensure that derived classes get properly deallocated. More...
 
void validateVertexType (const int vertexSize)
 Assert that the user-specified (in StelVertexBuffer) vertex type is valid. More...
 

Additional Inherited Members

- Protected Member Functions inherited from StelQGLArrayVertexBufferBackend
 StelQGLArrayVertexBufferBackend (const PrimitiveType type, const QVector< StelVertexAttribute > &attributes)
 Construct a StelQGLArrayVertexBufferBackend. More...
 
- Protected Attributes inherited from StelQGLArrayVertexBufferBackend
bool locked
 Is the vertex buffer locked (i.e. ready to draw?). More...
 
PrimitiveType primitiveType
 Graphics primitive type formed by the vertices of this buffer. More...
 
int vertexCount
 Number of vertices in the buffer. More...
 
int vertexCapacity
 Number of vertices we have allocated space for. More...
 
void * attributeBuffers [AttributeInterpretation_MAX]
 Buffers storing vertex attributes. More...
 
bool usingProjectedPositions
 Are we using vertex positions projected by a StelProjector? More...
 
Vec3fprojectedPositions
 Projected vertex positions to draw when we're projecting vertices with a StelProjector. More...
 
int projectedPositionsCapacity
 Allocated capacity of the projectedPositions array. More...
 

Detailed Description

OpenGL 1 vertex array style VertexBuffer backend.

Note
This is an internal class of the Renderer subsystem and should not be used elsewhere.
See Also
StelVertexBuffer, StelRenderer

Definition at line 32 of file StelQGL1ArrayVertexBufferBackend.hpp.

Member Function Documentation

void StelQGL1ArrayVertexBufferBackend::draw ( class StelQGL1Renderer renderer,
const Mat4f projectionMatrix,
class StelQGLIndexBuffer indexBuffer 
)

Draw the vertex buffer, optionally with index buffer specifying which vertices to draw.

Called by StelQGL1Renderer::drawVertexBufferBackend().

Parameters
rendererRenderer that created this buffer.
projectionMatrixProjection matrix (column-major) used for drawing.
indexBufferIf NULL, all vertices in the buffer are drawn in the order they are stored. If not NULL, specifies indices of vertices to draw.

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