How to get CATransform3D from Projection and ModelView matrices?

后端 未结 5 970
萌比男神i
萌比男神i 2020-12-06 07:55

all,

I\'ve got an iphone project that draws a 3D model using OpenGL-ES for a given model view matrix and given projection matrix. I needed to replace 3D model with C

5条回答
  •  一整个雨季
    2020-12-06 08:34

    Did you take into account that layers render into a GL context which already has an ortho projection matrix applied to it?

    See the introductory comment in on Mac; this class is private on iPhone, but the principles are the same.

    Also, OpenGL matrices are transposed in-memory compared to CATransform3D. Take that into account, too; while most of the results seem the same, some won't be.

提交回复
热议问题