All

Using the code below my quad moves position. However, I don't want this to happen, all I'm after is for the center of rotation to move.

Does anyone have any ideas?

Note, If I place a translate function before the rotate it has no effect whatsoever.

Any help would be appreciated.

I am trying to make a projection matrix scaling the screen and making a coordination system. For some reason I don't think any of my matrix calling is working...

Boy this has been troubling me ages now

I have implemented 2 different frameworks for rendering text in OpenGl 2.0
https://github.com/d3kod/Texample2 and http://androidblog.reindustries.com/a-real-opengl-es-2-0-2d-tutorial-par...

The problem is, in a 3D world you want the text to face you, or rotate around the object.
These all seem to rotate from the left corner and not the cent

I am applying a rotation matrix to my view matrix:

float[] mTmpMatrix = new float[16];
Matrix.setLookAtM(mTmpMatrix, 0, // mViewMatrix
mCameraPosition[0], mCameraPosition[1], mCameraPosition[2], // eye
mTargetRotPosition[0], mTargetRotPosition[1], mTargetRotPosition[2],
0, 1, 0); // up
Matrix.multiplyMM(mViewMatrix, 0, mRotationMatrix, 0, mTmpMatrix

This is supposed to render a cube. It looks like some parts of the rear faces are rendering in front of the ones closest to the camera. This happens even if I set it farther away.

I've used the following lines for the rotation of the object in open gl es2.
Translation and Scaling works properly, but rotation doesn't happen.

//modelViewMatrix is float[16];

Matrix.setIdentity(modelViewMatrix,0);
Matrix.translateM(modelViewMatrix, 0, x, y, z);
Matrix.rotateM(modelViewMatrix, 0, ax, 1, 0, 0);

//shader concatentation
//gl_Position = projection*modelview*position;

I tried ma

I've been wondering if anyone has some knowledge about

android.opengl.Matrix.multiplyMM

that they could share.

.

Reason for asking is, when learning through OpenGL ES, the method is widely used for all sorts of calculations. However, there is the android.renderscript.Matrix4f which I find working with more natural than with primitive float[] arrays.

I am trying to set a matrix of an image which I changed from original by zooming and panning. The new matrix value is not set when I want to show the same picture with the changed matrix.

I could get the matrix by getting the

imageView.getImageMatrix();

When I try to set it on a next view on a different activity on same image, its not changing the values.

I'm using this code:

Matrix matrix = new Matrix();
Bitmap bitmap = (Bitmap) BitmapFactory.decodeResource(getResources(), R.drawable.base);
matrix.setRotate(R0);
matrix.postTranslate(bitmap.getWidth()/2, bitmap.getHeight()/2);
Bitmap b = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
canvas.