开发者

How can I do `pushMatrix` or `popMatrix` of GL in CoreGraphics?

开发者 https://www.devze.com 2023-02-23 06:59 出处:网络
In GL, I have used some kind of this stuff, glMatrixMode(GL_MODELVIEW); glLoadId开发者_如何转开发entity();

In GL, I have used some kind of this stuff,

glMatrixMode(GL_MODELVIEW);
glLoadId开发者_如何转开发entity();
glPushMatrix();
glTranslatef();

// Do something

glPopMatrix();

To make and work in a derived coordinate system. How can I archive this functionality in CoreGraphics?


I suspect you’re talking about OpenGL ES, in which case you should go and check out this previous answer.

If you’re really talking about CoreGraphics check out CGContextSaveGState() and CGContextRestoreGState().

0

精彩评论

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

关注公众号