OpenGL ES Android Matrix Transformations

前端 未结 3 1189
再見小時候
再見小時候 2020-12-08 23:17

I have a renderer implementing GLSurfaceView.Renderer interface; a subclass of GLSurfaceView and some classes representing my objects I want to draw. I have the code from ht

3条回答
  •  醉话见心
    2020-12-08 23:59

    Note that you're not applying your projection matrix to the triangle you're drawing, that could cause problems.

    Should probably be:

    Matrix.multiplyMM(mMVMatrix, 0, mVMatrix, 0, mModelMatrix, 0);  
    Matrix.multiplyMM(mMVPMatrix, 0, mProjMatrix, 0, mMVMatrix, 0); 
    

提交回复
热议问题