Stellarium 0.12.4
List of all members | Public Member Functions
StelQGL1InterleavedArrayVertexBufferBackend Class Reference

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

#include <StelQGL1InterleavedArrayVertexBufferBackend.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 indices to draw. More...
 
- Public Member Functions inherited from StelQGLInterleavedArrayVertexBufferBackend
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 StelQGLInterleavedArrayVertexBufferBackend
 StelQGLInterleavedArrayVertexBufferBackend (const PrimitiveType type, const QVector< StelVertexAttribute > &attributes)
 Construct a StelQGLInterleavedArrayVertexBufferBackend. More...
 
- Protected Attributes inherited from StelQGLInterleavedArrayVertexBufferBackend
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...
 
int vertexBytes
 Size of a single vertex in bytes. More...
 
int vertexStride
 Size allocated for a single vertex (size of a vertex in the vertices array) More...
 
char * vertices
 Vertices of the buffer. 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 space in the projectedPositions array. More...
 

Detailed Description

OpenGL 1 interleaved vertex array 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 31 of file StelQGL1InterleavedArrayVertexBufferBackend.hpp.

Member Function Documentation

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

Draw the vertex buffer, optionally with index buffer specifying which indices 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: