Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. From ba215ecfbb55f3fd3605fcfca486e61f5f1e0023 Mon Sep 17 00:00:00 2001
  2. From: Neil Roberts <neil@linux.intel.com>
  3. Date: Thu, 24 Feb 2011 18:42:47 +0000
  4. Subject: [PATCH] cogl-blit: Disable blending when using texture render
  5.  
  6. When using a pipeline and the journal to blit images between
  7. framebuffers, it should disable blending. Otherwise it will end up
  8. blending the source texture with uninitialised garbage in the
  9. destination texture.
  10. ---
  11. clutter/cogl/cogl/cogl-blit.c | 6 ++++++
  12. 1 files changed, 6 insertions(+), 0 deletions(-)
  13.  
  14. diff --git a/clutter/cogl/cogl/cogl-blit.c b/clutter/cogl/cogl/cogl-blit.c
  15. index 1c40e34..1332999 100644
  16. --- a/clutter/cogl/cogl/cogl-blit.c
  17. +++ b/clutter/cogl/cogl/cogl-blit.c
  18. @@ -78,6 +78,12 @@ _cogl_blit_texture_render_begin (CoglBlitData *data)
  19. cogl_pipeline_set_layer_filters (ctx->blit_texture_pipeline, 0,
  20. COGL_PIPELINE_FILTER_NEAREST,
  21. COGL_PIPELINE_FILTER_NEAREST);
  22. +
  23. + /* Disable blending by just directly taking the contents of the
  24. + source texture */
  25. + cogl_pipeline_set_blend (ctx->blit_texture_pipeline,
  26. + "RGBA = ADD(SRC_COLOR, DST_COLOR*(0))",
  27. + NULL);
  28. }
  29.  
  30. pipeline = ctx->blit_texture_pipeline;
  31. --
  32. 1.7.3.16.g9464b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement