开发者

How to set the OpenGL project matrix to get projection as described below?

开发者 https://www.devze.com 2023-04-12 16:59 出处:网络
I just want to mimic a perspective projection without using z coordinate (ie: Only using 2d environment).

I just want to mimic a perspective projection without using z coordinate (ie: Only using 2d environment). The x axis must shrink as y axis increases towards the top.

I have following code as ready,

glMatrixMode(GL_PROJECTION);
glLo开发者_Go百科adIdentity();
glOrtho(0, size.width, 0, size.height, -1024 * CC_CONTENT_SCALE_FACTOR(), 1024 * CC_CONTENT_SCALE_FACTOR());
GLfloat proj[16] = { ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? };
glMultMatrixf(proj)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号