How To Display Blurred Bitmap Of Screenshot Using Opengl Es 2.0 On Android?
I am trying to create an app, in android using opengl es 2.0, that has a button on pressing which it would take the screenshot and would blurr it using any blur algo (here Fast blu
Solution 1:
The common method to display a full sized image is to use an orthogonal projection matrix:
(example using fixed functionality)
GLES20.glViewport(0, 0, windowWidth, windowHeight);
GLES20.glMatrixMode(GL_PROJECTION);
GLES20.glLoadIdentity();
GLES20.glOrtho(-1, 1, -1, 1, 1, -1);
than draw a fullscreen quad with your image bound as texture2D.
basic texture tutorial here.
basic quad tutorial here.
set quad coordinate as follow:
staticfloat squareCoords[] = {
-1f, -1f, 0.0f, // top left-1f, 1f, 0.0f, // bottom left1f, 1f, 0.0f, // bottom right1f, -1f, 0.0f }; // top right
Post a Comment for "How To Display Blurred Bitmap Of Screenshot Using Opengl Es 2.0 On Android?"