¡@

Home 

2014/10/15 ¤U¤È 10:04:44

iphone Programming Glossary: buffer2

take screen Programmatically of UIview+glview

http://stackoverflow.com/questions/6197137/take-screen-programmatically-of-uiviewglview

gl renders upside down so swap top to bottom into new array. there's gotta be a better way but this works. GLubyte buffer2 GLubyte malloc myDataLength for int y 0 y height y for int x 0 x width 4 x buffer2 height 1 y width 4 x buffer y 4 width.. better way but this works. GLubyte buffer2 GLubyte malloc myDataLength for int y 0 y height y for int x 0 x width 4 x buffer2 height 1 y width 4 x buffer y 4 width x make data provider with data. CGDataProviderRef provider CGDataProviderCreateWithData.. 4 x buffer y 4 width x make data provider with data. CGDataProviderRef provider CGDataProviderCreateWithData NULL buffer2 myDataLength NULL prep the ingredients int bitsPerComponent 8 int bitsPerPixel 32 int bytesPerRow 4 width CGColorSpaceRef..

GLPaint save image

http://stackoverflow.com/questions/946700/glpaint-save-image

gl renders upside down so swap top to bottom into new array. there's gotta be a better way but this works. GLubyte buffer2 GLubyte malloc myDataLength for int y 0 y 480 y for int x 0 x 320 4 x buffer2 479 y 320 4 x buffer y 4 320 x make data.. a better way but this works. GLubyte buffer2 GLubyte malloc myDataLength for int y 0 y 480 y for int x 0 x 320 4 x buffer2 479 y 320 4 x buffer y 4 320 x make data provider with data. CGDataProviderRef provider CGDataProviderCreateWithData NULL.. y 320 4 x buffer y 4 320 x make data provider with data. CGDataProviderRef provider CGDataProviderCreateWithData NULL buffer2 myDataLength NULL prep the ingredients int bitsPerComponent 8 int bitsPerPixel 32 int bytesPerRow 4 320 CGColorSpaceRef..

Save OpenGL Drawn item as a Image

http://stackoverflow.com/questions/9660723/save-opengl-drawn-item-as-a-image

gl renders upside down so swap top to bottom into new array. there's gotta be a better way but this works. GLubyte buffer2 GLubyte malloc myDataLength for int y 0 y 480 y for int x 0 x 320 4 x buffer2 479 y 320 4 x buffer y 4 320 x make data.. a better way but this works. GLubyte buffer2 GLubyte malloc myDataLength for int y 0 y 480 y for int x 0 x 320 4 x buffer2 479 y 320 4 x buffer y 4 320 x make data provider with data. CGDataProviderRef provider CGDataProviderCreateWithData NULL.. y 320 4 x buffer y 4 320 x make data provider with data. CGDataProviderRef provider CGDataProviderCreateWithData NULL buffer2 myDataLength NULL prep the ingredients int bitsPerComponent 8 int bitsPerPixel 32 int bytesPerRow 4 320 CGColorSpaceRef..

Saving imageRef from GLPaint creates completely black image

http://stackoverflow.com/questions/9857912/saving-imageref-from-glpaint-creates-completely-black-image

gl renders upside down so swap top to bottom into new array. there's gotta be a better way but this works. GLubyte buffer2 GLubyte malloc myDataLength for int y 0 y h s y memcpy buffer2 h s 1 y w 4 s buffer y 4 w s w 4 s free buffer work with.. there's gotta be a better way but this works. GLubyte buffer2 GLubyte malloc myDataLength for int y 0 y h s y memcpy buffer2 h s 1 y w 4 s buffer y 4 w s w 4 s free buffer work with the flipped buffer so get rid of the original one. make data provider.. rid of the original one. make data provider with data. CGDataProviderRef provider CGDataProviderCreateWithData NULL buffer2 myDataLength NULL prep the ingredients int bitsPerComponent 8 int bitsPerPixel 32 int bytesPerRow 4 w s CGColorSpaceRef..