나는 밤은이 pushmatrix, popmatrix 존재 알고, 매트릭스 스택, loadidentity가, 나는 2.0와 함께 작동하는 기존 1.0-1.1 엔진을 다시 쓸 수있는 방법안드로이드 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를 구현하는 방법은 무엇입니까? 누구든지 셰마가 있니?