0

I found this post, but it's too slow for a smooth live wallpaper. Is it possible to do the same with OpenGL, which should be faster?

Community
  • 1
  • 1
teamalpha5441
  • 741
  • 1
  • 6
  • 20

1 Answers1

1

It is definitely possible with OpenGL. You would load your two textures and then decide which to show on a per pixel basis using a fragment shader. The actual OpenGL part wont be too complicated as your are effectleiy just drawing a screen aligned quad. For an idea of how to write the shaders i'd look here.

As for which would be faster its hard to say, although i'd think OpengGL would be faster.

StuGrey
  • 1,479
  • 9
  • 20
  • You wouldn't need a mask texture in this approach, You would just pass the position of the users touch to the shader and make all of the pixels within a certain radius of that point transparent in the fragment shader. – StuGrey Jul 18 '12 at 19:29