KWinLibraries
kwinshadereffect.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KWIN_SHADEREFFECT_H
00022 #define KWIN_SHADEREFFECT_H
00023
00024
00025 #include <kwineffects.h>
00026
00027 #ifdef KWIN_HAVE_OPENGL_COMPOSITING
00028
00032 namespace KWin
00033 {
00034
00035 class GLTexture;
00036 class GLRenderTarget;
00037 class GLShader;
00038 class KWIN_EXPORT ShaderEffect : public Effect
00039 {
00040 public:
00041 ShaderEffect(const QString& shadername);
00042 virtual ~ShaderEffect();
00043
00044 virtual void prePaintScreen( ScreenPrePaintData& data, int time );
00045 virtual void postPaintScreen();
00046
00047 static bool supported();
00048
00049 protected:
00050 bool isEnabled() const;
00051 void setEnabled(bool enabled);
00052
00053 GLShader* shader() const;
00054
00055 bool loadData(const QString& shadername);
00056
00057 private:
00058 GLTexture* mTexture;
00059 GLRenderTarget* mRenderTarget;
00060 GLShader* mShader;
00061 bool mValid;
00062
00063 double mTime;
00064
00065 bool mEnabled;
00066 };
00067
00068 }
00069
00072 #endif
00073
00074 #endif