【问题标题】:Draw CGImageRef & CGBitmapContextRef on CGL context?在 XML 上下文中绘制 CGImageRef 和 CGBitmapContext Ref?
【发布时间】:2011-08-29 15:32:42
【问题描述】:

我正在寻找一种在 CGL Context 上绘制 CGImageref 和 CGBitmapContextRef 的方法?

【问题讨论】:

    标签: macos opengl core-graphics quartz-graphics cglayer


    【解决方案1】:

    要绘制到 CGL 上下文,您需要从 CGImage 设置一个 openGL 纹理。为此,您必须按照此处所述访问图像的原始像素:

    http://developer.apple.com/library/ios/#qa/qa1509/_index.html

    如果您有这些像素,只需从这些像素创建一个 openGL 纹理即可。只是谷歌的教程,你应该找到很多,即: http://www.cse.msu.edu/~cse872/tutorial4.html

    【讨论】:

      猜你喜欢
      • 2010-10-26
      • 2014-04-09
      • 2016-04-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多