Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://astro.uni-altai.ru/~aw/stellarium/api/classStelQGLViewport.html
Дата изменения: Unknown Дата индексирования: Fri Feb 28 07:34:56 2014 Кодировка: Поисковые слова: п п р п р п р п р п р п р п р п р п р п р п р п |
Stellarium 0.12.3
|
Manages OpenGL viewport. More...
#include <StelQGLViewport.hpp>
Public Member Functions | |
StelQGLViewport (StelQGLWidget *const glWidget, QGraphicsView *const parent) | |
Construct a StelQGLViewport using specified widget. More... | |
~StelQGLViewport () | |
Destroy the StelQGLViewport. More... | |
void | init (const bool npot, const QString &glVendor, const QString &glRenderer) |
Initialize the viewport. More... | |
QPaintEngine::Type | qtPaintEngineType () const |
Get paint engine type used for Qt drawing. More... | |
void | viewportHasBeenResized (const QSize newSize) |
Called when viewport size changes so we can replace the FBOs. More... | |
void | setDefaultPainter (QPainter *const painter, const QGLContext *const context) |
Set the default painter to use when not drawing to FBO. More... | |
QImage | screenshot () const |
Grab a screenshot. More... | |
QSize | getViewportSize () const |
Return current viewport size in pixels. More... | |
StelTextureBackend * | getViewportTextureBackend (class StelQGLRenderer *renderer) |
Get a texture of the viewport. More... | |
bool | useFBO () const |
Are we using framebuffer objects? More... | |
void | setFont (const QFont &font) |
Set font to use for drawing text. More... | |
void | startFrame () |
Start using drawing calls. More... | |
void | suspendFrame () |
Suspend drawing, not showing the result on the screen. More... | |
void | finishFrame (const bool swapBuffers=true) |
Finish using draw calls. More... | |
void | prepareToDrawViewport () |
Code that must run before drawing the final result of the rendering to the viewport. More... | |
void | disablePainting () |
Disable Qt painting. More... | |
void | enablePainting () |
Enable Qt painting (with the current default painter, or constructing a fallback if no default). More... | |
QPainter * | getPainter () |
Return the painter currently used to paint, if any. More... | |
Manages OpenGL viewport.
This class handles things like framebuffers and Qt painting to the viewport.
Definition at line 84 of file StelQGLViewport.hpp.
|
inline |
Construct a StelQGLViewport using specified widget.
glWidget | GL widget that contains the viewport. |
parent | Parent widget of glWidget. |
Definition at line 91 of file StelQGLViewport.hpp.
|
inline |
Destroy the StelQGLViewport.
Definition at line 132 of file StelQGLViewport.hpp.
|
inline |
Disable Qt painting.
Definition at line 337 of file StelQGLViewport.hpp.
|
inline |
Enable Qt painting (with the current default painter, or constructing a fallback if no default).
Definition at line 351 of file StelQGLViewport.hpp.
|
inline |
Finish using draw calls.
Definition at line 304 of file StelQGLViewport.hpp.
|
inline |
Return the painter currently used to paint, if any.
Definition at line 359 of file StelQGLViewport.hpp.
|
inline |
Return current viewport size in pixels.
Definition at line 247 of file StelQGLViewport.hpp.
StelTextureBackend* StelQGLViewport::getViewportTextureBackend | ( | class StelQGLRenderer * | renderer | ) |
Get a texture of the viewport.
|
inline |
Initialize the viewport.
npot | Are non-power-of-two textures supported? |
glVendor | The GL_VENDOR string (usually specifies the GPU driver). |
glRenderer | The GL_RENDERER string (usually specifies the GPU). |
Definition at line 148 of file StelQGLViewport.hpp.
|
inline |
Code that must run before drawing the final result of the rendering to the viewport.
Definition at line 325 of file StelQGLViewport.hpp.
|
inline |
Get paint engine type used for Qt drawing.
Definition at line 189 of file StelQGLViewport.hpp.
|
inline |
Grab a screenshot.
Definition at line 240 of file StelQGLViewport.hpp.
|
inline |
Set the default painter to use when not drawing to FBO.
This is the only place where we might be getting a painter from outside world, so we require that it uses a GL or GL2 paint engine.
painter | Painter to set. |
context | GL context used by the renderer, for error checking. |
Definition at line 214 of file StelQGLViewport.hpp.
|
inline |
Set font to use for drawing text.
Can be only called when Qt painting is enabled.
Definition at line 266 of file StelQGLViewport.hpp.
|
inline |
Start using drawing calls.
Definition at line 274 of file StelQGLViewport.hpp.
|
inline |
Suspend drawing, not showing the result on the screen.
Finishes using draw calls for this frame. Drawing can continue later. Only usable with FBOs.
Definition at line 297 of file StelQGLViewport.hpp.
|
inline |
Are we using framebuffer objects?
Definition at line 257 of file StelQGLViewport.hpp.
|
inline |
Called when viewport size changes so we can replace the FBOs.
Definition at line 195 of file StelQGLViewport.hpp.