Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/kwinglutils.h
Show First 20 Lines • Show All 540 Lines • ▼ Show 20 Line(s) | 421 | public: | |||
---|---|---|---|---|---|
541 | static void setVirtualScreenScale(qreal scale) { | 541 | static void setVirtualScreenScale(qreal scale) { | ||
542 | s_virtualScreenScale = scale; | 542 | s_virtualScreenScale = scale; | ||
543 | } | 543 | } | ||
544 | 544 | | |||
545 | static qreal virtualScreenScale() { | 545 | static qreal virtualScreenScale() { | ||
546 | return s_virtualScreenScale; | 546 | return s_virtualScreenScale; | ||
547 | } | 547 | } | ||
548 | 548 | | |||
549 | /** | ||||
550 | * The framebuffer of KWin's OpenGL window or other object currently being rendered to | ||||
551 | * | ||||
552 | * @since 5.18 | ||||
553 | */ | ||||
554 | static void setKWinFramebuffer(GLuint fb) { | ||||
fredrik: Could we name this setDefaultFramebuffer()?
I think the documentation is also a bit misleading… | |||||
I find naming this API something like defaultFramebuffer difficult (as outlined in D25904#575910): because the default framebuffer is not changed when the function is called. The default framebuffer is what this can be changed to but it is not always the default framebuffer. Would setBackendFramebuffer be alright with you? Or setBottomFramebuffer? I agree the documentation is misleading. I will change it up a bit. romangg: I find naming this API something like defaultFramebuffer difficult (as outlined in… | |||||
For some reason phabricator didn't warn me that the revision had been updated, so I didn't see that Vlad had already suggested that. Between those two I think I would prefer setBottomFramebuffer(). But how about setSurfaceFramebuffer()? fredrik: For some reason phabricator didn't warn me that the revision had been updated, so I didn't see… | |||||
555 | s_kwinFramebuffer = fb; | ||||
556 | } | ||||
557 | | ||||
549 | 558 | | |||
550 | protected: | 559 | protected: | ||
551 | void initFBO(); | 560 | void initFBO(); | ||
552 | 561 | | |||
553 | 562 | | |||
554 | private: | 563 | private: | ||
555 | friend void KWin::cleanupGL(); | 564 | friend void KWin::cleanupGL(); | ||
556 | static void cleanup(); | 565 | static void cleanup(); | ||
557 | static bool sSupported; | 566 | static bool sSupported; | ||
558 | static bool s_blitSupported; | 567 | static bool s_blitSupported; | ||
559 | static QStack<GLRenderTarget*> s_renderTargets; | 568 | static QStack<GLRenderTarget*> s_renderTargets; | ||
560 | static QSize s_virtualScreenSize; | 569 | static QSize s_virtualScreenSize; | ||
561 | static QRect s_virtualScreenGeometry; | 570 | static QRect s_virtualScreenGeometry; | ||
562 | static qreal s_virtualScreenScale; | 571 | static qreal s_virtualScreenScale; | ||
563 | static GLint s_virtualScreenViewport[4]; | 572 | static GLint s_virtualScreenViewport[4]; | ||
573 | static GLuint s_kwinFramebuffer; | ||||
564 | 574 | | |||
565 | GLTexture mTexture; | 575 | GLTexture mTexture; | ||
566 | bool mValid; | 576 | bool mValid; | ||
567 | 577 | | |||
568 | GLuint mFramebuffer; | 578 | GLuint mFramebuffer; | ||
569 | }; | 579 | }; | ||
570 | 580 | | |||
571 | enum VertexAttributeType { | 581 | enum VertexAttributeType { | ||
▲ Show 20 Lines • Show All 256 Lines • Show Last 20 Lines |
Could we name this setDefaultFramebuffer()?
I think the documentation is also a bit misleading, because it is not necessarily the framebuffer object currently being rendered to. It's the framebuffer at the very bottom of the stack.