MTLRenderPassDescriptor
2016-04-03 13:38
399 查看
在创建MTLRenderCommandEncoder对象的时候需要传入 MTLRenderPassDescriptor 作为参数, 那么MTLRenderPassDescritpor 是个什么东西, 应该如何设置其中的参数呢?
1. 创建 MTLRenderPassDescriptor
+ (MTLRenderPassDescriptor
*)renderPassDescriptor
2 常用的属性
(1) colorAttachment
在定义中是数组(array). 继承自MTLRenderPassAttachmentDescritpor
(2) depthAttachment
depthAttachment 也是继承自 MTLRenderPassAttachmentDescritpor, 所以常用的属性就很相似
3. MTLRenderPassAttachmentDescritpor
其常用属性包括:
@property (nullable, nonatomic, strong) id<MTLTexture> texture, 普通直接使用CAMetalLayer的nextDrawable中的texture
@property (nonatomic) MTLClearColor clearColor
@property (nonatomic) MTLStoreAction storeAction
@property (nonatomic) MTLLoadAction loadAction
1. 创建 MTLRenderPassDescriptor
+ (MTLRenderPassDescriptor
*)renderPassDescriptor
2 常用的属性
(1) colorAttachment
在定义中是数组(array). 继承自MTLRenderPassAttachmentDescritpor
(2) depthAttachment
depthAttachment 也是继承自 MTLRenderPassAttachmentDescritpor, 所以常用的属性就很相似
3. MTLRenderPassAttachmentDescritpor
其常用属性包括:
@property (nullable, nonatomic, strong) id<MTLTexture> texture, 普通直接使用CAMetalLayer的nextDrawable中的texture
@property (nonatomic) MTLClearColor clearColor
@property (nonatomic) MTLStoreAction storeAction
@property (nonatomic) MTLLoadAction loadAction
相关文章推荐
- notepad++ 编辑GAMS文件
- fzu2127
- 数学知识--错排公式
- 第五--进度条
- hdu5656 CA Loves GCD
- Objective-C中@property的所有属性详解
- Java实现字符串倒序输出的常用方法小结
- mycat 用Jconsole监控mycat压测的各种性能曲线
- 北京Uber优步司机奖励政策(4月3日)
- hdu 1789 Doing Homework again
- iOS_加密保护2_sqlite
- 例程3. 串口 -- 慕司板IAP15
- 杭电ACM题1003
- 关于python 的url_encode关于的嵌套字典类型变量的编码扩展
- javac编译servlet类出现的一系列问题及分析解决(javac编译servlet找不到javax.servlet.*包的问题)
- 小区的路
- 百度云分享文件自己设置密码
- Max Sum Plus Plus---hdu1024(动态规划求M段的最大和)
- Java中Object的使用:重载equals、hashCode及实现compareTo
- Problem 瞎子与瘸子的故事 bfs + 优先队列