私はありえないがpushmatrix、popmatrixを存在することを知っている、と行列スタックは、loadidentityは、私が2.0に対応するために、既存の1.0から1.1エンジンを書き換えることができますどのようにのAndroidのOpenGL ES 2.0 glpushmatrixなど
など翻訳して回転?どのように私は世界で私MODELLを翻訳することができ、それが動作していない
void glRotate(float x, float y, float z) {
Matrix.setRotateM(mMMatrix, 0, x, 1, 0, 0);
Matrix.setRotateM(mMMatrix, 0, y, 0, 1, 0);
Matrix.setRotateM(mMMatrix, 0, z, 0, 0, 1);
Matrix.multiplyMM(mMVPMatrix, 0, mVMatrix, 0, mMMatrix, 0);
Matrix.multiplyMM(mMVPMatrix, 0, mProjMatrix, 0, mMVPMatrix, 0);
}
void glTranslate(float x, float y, float z) {
Matrix.translateM(mMMatrix, 0, x, y, z);
Matrix.multiplyMM(mMVPMatrix, 0, mVMatrix, 0, mMMatrix, 0);
Matrix.multiplyMM(mMVPMatrix, 0, mProjMatrix, 0, mMVPMatrix, 0);
}
glTranslate:
は、私が最初にこれを試してみましたか?glRotateはZで回転します。私のオブジェクトは、x、yはまったく動作しません。
+ マトリックススタック/ glpush/glpopmatrixの実装方法は?誰でもシーマを持っていますか?