我写了一些测试代码,just for testing the stack overflow.
int MyFunc(long c)
{
char buffer[12];
return sprintf(buffer, "xxxxxxxxxxx%ld", c);
}
Run Code Online (Sandbox Code Playgroud)
当我将其编译为 ARM64 程序集时,我得到了结果
MyFunc(long): // @MyFunc(long)
sub sp, sp, #32 // =32
stp x29, x30, [sp, #16] // 16-byte Folded Spill
add x29, sp, #16 // =16
adrp x1, .L.str
mov x2, x0
add x1, x1, :lo12:.L.str
add x0, sp, #4 // =4
bl sprintf
ldp x29, x30, [sp, #16] // 16-byte Folded Reload
add sp, sp, #32 // =32
ret …Run Code Online (Sandbox Code Playgroud) 我正在重构cocos2d-x的渲染层,新引擎将在iOS. 在原始版本中,当应用程序在后台停留很长时间后进入前台时,cocos2dx 会重新创建所有缓冲区和纹理。
我是 Metal 新手,我的问题是:是否有必要将 MTLBuffer、MTLTexture 和其他 Metal 资源重新创建为 GLES?