0

I am looking for a way to draw a CGImageref and CGBitmapContextRef on CGL Context?

genpfault
  • 51,148
  • 11
  • 85
  • 139
RLT
  • 4,219
  • 4
  • 37
  • 91

1 Answers1

2

To draw to a CGL context you need to setup an openGL texture from the CGImage. To do so you have to access the raw pixels of the image as described here:

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

if you have those pixels it's just a matter of creating an openGL texture from those pixels. Just google for tutorials, you should find plenty, i.e: http://www.cse.msu.edu/~cse872/tutorial4.html

moka
  • 4,353
  • 2
  • 37
  • 63