Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/kwinglutils.h
Show First 20 Lines • Show All 499 Lines • ▼ Show 20 Line(s) | 419 | public: | |||
---|---|---|---|---|---|
500 | * in the virtual geometry space the rendering system uses. | 500 | * in the virtual geometry space the rendering system uses. | ||
501 | * @see setVirtualScreenGeometry | 501 | * @see setVirtualScreenGeometry | ||
502 | * @since 5.9 | 502 | * @since 5.9 | ||
503 | **/ | 503 | **/ | ||
504 | static QRect virtualScreenGeometry() { | 504 | static QRect virtualScreenGeometry() { | ||
505 | return s_virtualScreenGeometry; | 505 | return s_virtualScreenGeometry; | ||
506 | } | 506 | } | ||
507 | 507 | | |||
508 | /** | ||||
509 | * The scale of the OpenGL window currently being rendered to | ||||
510 | * | ||||
511 | * @returns the ratio between the virtual geometry space the rendering | ||||
512 | * system uses and the target | ||||
513 | * @since 5.10 | ||||
514 | */ | ||||
515 | static void setVirtualScreenScale(qreal scale) { | ||||
516 | s_virtualScreenScale = scale; | ||||
517 | } | ||||
518 | | ||||
519 | static qreal virtualScreenScale() { | ||||
520 | return s_virtualScreenScale; | ||||
521 | } | ||||
522 | | ||||
508 | 523 | | |||
509 | protected: | 524 | protected: | ||
510 | void initFBO(); | 525 | void initFBO(); | ||
511 | 526 | | |||
512 | 527 | | |||
513 | private: | 528 | private: | ||
514 | friend void KWin::cleanupGL(); | 529 | friend void KWin::cleanupGL(); | ||
515 | static void cleanup(); | 530 | static void cleanup(); | ||
516 | static bool sSupported; | 531 | static bool sSupported; | ||
517 | static bool s_blitSupported; | 532 | static bool s_blitSupported; | ||
518 | static QStack<GLRenderTarget*> s_renderTargets; | 533 | static QStack<GLRenderTarget*> s_renderTargets; | ||
519 | static QSize s_virtualScreenSize; | 534 | static QSize s_virtualScreenSize; | ||
520 | static QRect s_virtualScreenGeometry; | 535 | static QRect s_virtualScreenGeometry; | ||
536 | static qreal s_virtualScreenScale; | ||||
521 | 537 | | |||
522 | GLTexture mTexture; | 538 | GLTexture mTexture; | ||
523 | bool mValid; | 539 | bool mValid; | ||
524 | 540 | | |||
525 | GLuint mFramebuffer; | 541 | GLuint mFramebuffer; | ||
526 | }; | 542 | }; | ||
527 | 543 | | |||
528 | enum VertexAttributeType { | 544 | enum VertexAttributeType { | ||
▲ Show 20 Lines • Show All 244 Lines • Show Last 20 Lines |