215
215
priv->blurred_background_texture = 0;
216
216
priv->refresh_background_texture = FALSE;
217
// CHECKGL (glActiveTextureARB(GL_TEXTURE0) );
218
// CHECKGL (glGenTextures (1, &priv->blurred_background_texture));
219
// CHECKGL (glBindTexture (GL_TEXTURE_2D, priv->blurred_background_texture));
220
// CHECKGL (glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA8, 1, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL));
221
// CHECKGL (glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
222
// CHECKGL (glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR));
223
// CHECKGL (glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP));
224
// CHECKGL (glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP));
219
CHECKGL (glGenTextures (1, &priv->blurred_background_texture));
220
CHECKGL (glActiveTextureARB(GL_TEXTURE0) );
221
CHECKGL (glBindTexture (GL_TEXTURE_2D, priv->blurred_background_texture));
222
CHECKGL (glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA8, 1, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL));
223
CHECKGL (glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
224
CHECKGL (glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR));
225
CHECKGL (glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP));
226
CHECKGL (glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP));
439
442
stage = clutter_actor_get_stage(actor);
440
443
clutter_actor_get_size (CLUTTER_ACTOR(stage), &stage_width, &stage_height);
445
CtkEffectContext* fxctx = ctk_effect_context_get_default_for_actor (actor);
446
/* Get the current render target */
447
CtkRenderTarget* top_rt = ctk_effect_context_peek_render_target(fxctx);
442
450
CHECKGL( glPixelStorei(GL_PACK_ALIGNMENT, 1) );
443
451
CHECKGL( glPixelStorei(GL_PACK_ROW_LENGTH, 0) );
444
452
CHECKGL( glPixelStorei(GL_PACK_IMAGE_HEIGHT, 0) );
465
473
// Disable Scissoring
466
474
CHECKGL (glDisable (GL_SCISSOR_TEST));
468
CtkEffectContext* fxctx = ctk_effect_context_get_default_for_actor (actor);
470
/* Get the current render target */
471
CtkRenderTarget* top_rt = ctk_effect_context_peek_render_target(fxctx);
473
476
/* reserve 2 render targets */
474
477
CtkRenderTarget* rt0 = ctk_effect_context_grab_render_target (fxctx);
475
478
CtkRenderTarget* rt1 = ctk_effect_context_grab_render_target (fxctx);
518
521
/* Release the render target we use */
519
522
ctk_effect_context_release_render_target (fxctx, rt0);
520
523
ctk_effect_context_release_render_target (fxctx, rt1);
522
526
/* Restore the previous render target */