【发布时间】:2011-08-29 15:32:42
【问题描述】:
我正在寻找一种在 CGL Context 上绘制 CGImageref 和 CGBitmapContextRef 的方法?
【问题讨论】:
标签: macos opengl core-graphics quartz-graphics cglayer
我正在寻找一种在 CGL Context 上绘制 CGImageref 和 CGBitmapContextRef 的方法?
【问题讨论】:
标签: macos opengl core-graphics quartz-graphics cglayer
要绘制到 CGL 上下文,您需要从 CGImage 设置一个 openGL 纹理。为此,您必须按照此处所述访问图像的原始像素:
http://developer.apple.com/library/ios/#qa/qa1509/_index.html
如果您有这些像素,只需从这些像素创建一个 openGL 纹理即可。只是谷歌的教程,你应该找到很多,即: http://www.cse.msu.edu/~cse872/tutorial4.html
【讨论】: