Stellarium 0.12.0
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · Renderer · File Structure

StelQGL1Renderer Class Reference

Renderer backend using OpenGL 1.2 with Qt. More...

#include <StelQGL1Renderer.hpp>

List of all members.

Public Member Functions

 StelQGL1Renderer (QGraphicsView *parent)
 Construct a StelQGL1Renderer.
virtual bool init ()
 Initialize the renderer.
virtual bool areFloatTexturesSupported () const
 Returns true if floating point textures are supported, false otherwise.
virtual bool areNonPowerOfTwoTexturesSupported () const
 Returns true if non-power-of-two textures are supported, false otherwise.
virtual StelGLSLShadercreateGLSLShader ()
 Create a GLSL shader.
virtual bool isGLSLSupported () const
 Are GLSL shaders supported?

Protected Member Functions

virtual StelVertexBufferBackendcreateVertexBufferBackend (const PrimitiveType primitiveType, const QVector< StelVertexAttribute > &attributes)
 Create a vertex buffer backend.
virtual void drawVertexBufferBackend (StelVertexBufferBackend *vertexBuffer, StelIndexBuffer *indexBuffer=NULL, StelProjector *projector=NULL, bool dontProject=false)
 Draw contents of a vertex buffer (backend).
virtual int getTextureUnitCountBackend ()
 Return the number of texture units (implementation).
virtual void invariant () const
 Asserts that we're in a valid state.

Detailed Description

Renderer backend using OpenGL 1.2 with Qt.

GL 1.0 is not supported as it doesn't have vertex arrays, and GL 1.1 doesn't have clamp to edge texture wrap mode. That said, pretty much everything supports GL 1.2 (introduced in 1998). The oldest GPUs supporting GL 1.2 are ATI Rage and GeForce 2 (GeForce 1 and TNT2 support GL 1.2 with updated drivers, although some functionality might be software emulated).

Although later GL1 versions and extensions have many useful features (basic shaders, VBOs, etc.), these are not used - with the exception of multitexturing, which is still not mandatory - so compatibility is as high as possible.

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

Definition at line 49 of file StelQGL1Renderer.hpp.


Constructor & Destructor Documentation

StelQGL1Renderer::StelQGL1Renderer ( QGraphicsView *  parent  )  [inline]

Construct a StelQGL1Renderer.

Parameters:
parent Parent widget for the renderer's GL widget.

Definition at line 37 of file StelQGL1Renderer.hpp.


Member Function Documentation

virtual bool StelQGL1Renderer::areFloatTexturesSupported (  )  const [inline, virtual]

Returns true if floating point textures are supported, false otherwise.

Implements StelRenderer.

Definition at line 71 of file StelQGL1Renderer.hpp.

virtual bool StelQGL1Renderer::areNonPowerOfTwoTexturesSupported (  )  const [inline, virtual]

Returns true if non-power-of-two textures are supported, false otherwise.

Implements StelQGLRenderer.

Definition at line 73 of file StelQGL1Renderer.hpp.

virtual StelGLSLShader* StelQGL1Renderer::createGLSLShader (  )  [inline, virtual]

Create a GLSL shader.

This can only be called if isGLSLSupported() is true.

The constructed shader must be deleted before the StelRenderer is destroyed.

Reimplemented from StelRenderer.

Definition at line 75 of file StelQGL1Renderer.hpp.

virtual StelVertexBufferBackend* StelQGL1Renderer::createVertexBufferBackend ( const PrimitiveType  primitiveType,
const QVector< StelVertexAttribute > &  attributes 
) [inline, protected, virtual]

Create a vertex buffer backend.

Used by createVertexBuffer.

This allows each Renderer backend to create its own vertex buffer backend.

Parameters:
primitiveType Graphics primitive type stored in the buffer.
attributes Descriptions of all attributes of the vertex type stored in the buffer.
Returns:
Pointer to a vertex buffer backend specific to the Renderer backend.

Implements StelRenderer.

Definition at line 85 of file StelQGL1Renderer.hpp.

virtual void StelQGL1Renderer::drawVertexBufferBackend ( StelVertexBufferBackend vertexBuffer,
StelIndexBuffer indexBuffer = NULL,
StelProjector projector = NULL,
bool  dontProject = false 
) [inline, protected, virtual]

Draw contents of a vertex buffer (backend).

Used by drawVertexBuffer.

See also:
drawVertexBuffer

Implements StelRenderer.

Definition at line 92 of file StelQGL1Renderer.hpp.

virtual int StelQGL1Renderer::getTextureUnitCountBackend (  )  [inline, protected, virtual]

Return the number of texture units (implementation).

Implements StelQGLRenderer.

Definition at line 188 of file StelQGL1Renderer.hpp.

virtual bool StelQGL1Renderer::init (  )  [inline, virtual]

Initialize the renderer.

Must be called before any other methods.

Returns:
true on success, false if there was an error.

Reimplemented from StelQGLRenderer.

Definition at line 51 of file StelQGL1Renderer.hpp.

virtual void StelQGL1Renderer::invariant (  )  const [inline, protected, virtual]

Asserts that we're in a valid state.

Overriding methods should also call StelQGLRenderer::invariant().

Reimplemented from StelQGLRenderer.

Definition at line 201 of file StelQGL1Renderer.hpp.

virtual bool StelQGL1Renderer::isGLSLSupported (  )  const [inline, virtual]

Are GLSL shaders supported?

Implements StelRenderer.

Definition at line 81 of file StelQGL1Renderer.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Jan 31 14:05:46 2013 for Stellarium by  doxygen 1.6.3