gpt4 book ai didi

iphone - Mac 中的 OpenGL 上下文

转载 作者:行者123 更新时间:2023-12-03 21:04:32 30 4
gpt4 key购买 nike

我怎样才能做这个 Objective-C 代码在 iPhone 上做同样的事情,但在 Mac 上做呢?

EAGLContext *k_context = [[[EAGLContext alloc]
initWithAPI:kEAGLRenderingAPIOpenGLES1
sharegroup:[[[[CCDirector sharedDirector] openGLView] context] sharegroup]] autorelease];
[EAGLContext setCurrentContext:k_context];

最佳答案

Apple 在其 developer documentation 中对此进行了很好的解释。 。在 MacOS X 上,可以通过三种方式创建 OpenGL 上下文:

关于iphone - Mac 中的 OpenGL 上下文,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8692130/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com