Fix Linker error with Lanczos filter

icc-effect-5.14.5
Martin Gräßlin 2010-11-20 13:49:39 +01:00
parent dfde66b4a9
commit 14522ebecb
2 changed files with 14 additions and 0 deletions

View File

@ -38,9 +38,11 @@ namespace KWin
LanczosFilter::LanczosFilter( QObject* parent )
: QObject( parent )
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
#ifndef KWIN_HAVE_OPENGLES
, m_offscreenTex( 0 )
, m_offscreenTarget( 0 )
, m_shader( 0 )
#endif
#endif
, m_inited( false)
{
@ -49,8 +51,10 @@ LanczosFilter::LanczosFilter( QObject* parent )
LanczosFilter::~LanczosFilter()
{
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
#ifndef KWIN_HAVE_OPENGLES
delete m_offscreenTarget;
delete m_offscreenTex;
#endif
#endif
}
@ -60,6 +64,7 @@ void LanczosFilter::init()
return;
m_inited = true;
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
#ifndef KWIN_HAVE_OPENGLES
KSharedConfigPtr config = KSharedConfig::openConfig( "kwinrc" );
@ -80,6 +85,7 @@ void LanczosFilter::init()
delete m_shader;
m_shader = 0;
}
#endif
#endif
}
@ -126,6 +132,7 @@ static float lanczos( float x, float a )
}
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
#ifndef KWIN_HAVE_OPENGLES
void LanczosShader::createKernel( float delta, int *size )
{
const float a = 2.0;
@ -166,6 +173,7 @@ void LanczosShader::createOffsets( int count, float width, Qt::Orientation direc
}
}
#endif
#endif
void LanczosFilter::performPaint( EffectWindowImpl* w, int mask, QRegion region, WindowPaintData& data )
{

View File

@ -39,8 +39,10 @@ class GLTexture;
class GLRenderTarget;
class GLShader;
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
#ifndef KWIN_HAVE_OPENGLES
class LanczosShader;
#endif
#endif
class LanczosFilter
: public QObject
@ -62,13 +64,16 @@ class LanczosFilter
GLTexture *m_offscreenTex;
GLRenderTarget *m_offscreenTarget;
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
#ifndef KWIN_HAVE_OPENGLES
LanczosShader *m_shader;
#endif
#endif
QBasicTimer m_timer;
bool m_inited;
};
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
#ifndef KWIN_HAVE_OPENGLES
class LanczosShader
: public QObject
{
@ -95,6 +100,7 @@ class LanczosShader
uint m_arbProgram; // TODO: GLuint
};
#endif
#endif
} // namespace