![]() |
Stellarium 0.12.0 | ||
| Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · Renderer · File Structure |
Renderer backend using OpenGL 1.2 with Qt. More...
#include <StelQGL1Renderer.hpp>
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 StelGLSLShader * | createGLSLShader () |
| Create a GLSL shader. | |
| virtual bool | isGLSLSupported () const |
| Are GLSL shaders supported? | |
Protected Member Functions | |
| virtual StelVertexBufferBackend * | createVertexBufferBackend (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. | |
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.
Definition at line 49 of file StelQGL1Renderer.hpp.
| StelQGL1Renderer::StelQGL1Renderer | ( | QGraphicsView * | parent | ) | [inline] |
Construct a StelQGL1Renderer.
| parent | Parent widget for the renderer's GL widget. |
Definition at line 37 of file StelQGL1Renderer.hpp.
| 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.
| primitiveType | Graphics primitive type stored in the buffer. | |
| attributes | Descriptions of all attributes of the vertex type stored in the buffer. |
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.
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.
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.
1.6.3