¡@

Home 

2014/10/15 ¤U¤È 10:09:41

iphone Programming Glossary: glteximage2d

Hardware accelerated h.264 decoding to texture, overlay or similar in iOS

http://stackoverflow.com/questions/10646657/hardware-accelerated-h-264-decoding-to-texture-overlay-or-similar-in-ios

point you're handed the raw decoded frames of video in BGRA format. These can be uploaded to a texture using either glTexImage2D or the more efficient texture caches in iOS 5.0. From there you can process for display or retrieve the frames from OpenGL.. movieFrame 0 glBindTexture GL_TEXTURE_2D outputTexture Using BGRA extension to pull in video frame data directly glTexImage2D GL_TEXTURE_2D 0 GL_RGBA bufferWidth bufferHeight 0 GL_BGRA GL_UNSIGNED_BYTE CVPixelBufferGetBaseAddress movieFrame CGSize..

Draw to offscreen renderbuffer in OpenGL ES (iPhone)

http://stackoverflow.com/questions/1853551/draw-to-offscreen-renderbuffer-in-opengl-es-iphone

texturebuffer create the texture glGenTextures 1 canvastexture glBindTexture GL_TEXTURE_2D canvastexture glTexImage2D GL_TEXTURE_2D 0 GL_RGBA 512 512 0 GL_RGBA GL_UNSIGNED_BYTE NULL glFramebufferTexture2DOES GL_FRAMEBUFFER_OES GL_COLOR_ATTACHMENT0_OES..

OpenGL ES; rendering texture created from CGBitmapContext

http://stackoverflow.com/questions/2713890/opengl-es-rendering-texture-created-from-cgbitmapcontext

CGContextSetRGBFillColor ct 0 1 0 1 CGContextFillRect ct CGRectMake 0 0 50 50 CGContextRelease ct glTexImage2D GL_TEXTURE_2D 0 GL_RGBA width height 0 GL_RGBA GL_UNSIGNED_BYTE textureData float verts 0.0f 0.0f 0.0f 50.0f 0.0f 0.0f 0.0f..

render to floating point texture under iOS

http://stackoverflow.com/questions/3850569/render-to-floating-point-texture-under-ios

object. Here's my attempt GLuint textureHandle glGenTextures 1 textureHandle glBindTexture GL_TEXTURE_2D textureHandle glTexImage2D GL_TEXTURE_2D 0 GL_LUMINANCE 256 256 0 GL_LUMINANCE GL_HALF_FLOAT_OES 0 glTexParameteri GL_TEXTURE_2D GL_TEXTURE_MIN_FILTER..

OpenGL ES (IPhone) alpha blending looks weird

http://stackoverflow.com/questions/4012035/opengl-es-iphone-alpha-blending-looks-weird

CGContextTranslateCTM context 0 height height CGContextDrawImage context CGRectMake 0 0 width height image.CGImage glTexImage2D GL_TEXTURE_2D 0 GL_RGBA width height 0 GL_RGBA GL_UNSIGNED_BYTE imageData CGContextRelease context free imageData image..

Render contents of UIView as an OpenGL texture

http://stackoverflow.com/questions/4118778/render-contents-of-uiview-as-an-opengl-texture

CGColorSpaceRelease colourSpace draw the view to the buffer view.layer renderInContext context upload to OpenGL glTexImage2D GL_TEXTURE_2D 0 GL_RGBA view.bounds.size.width view.bounds.size.height 0 GL_RGBA GL_UNSIGNED_BYTE pixelBuffer clean up..

Can example “GLImageProcessing” work with multi filters

http://stackoverflow.com/questions/4375479/can-example-glimageprocessing-work-with-multi-filters

GL_TEXTURE_2D GL_TEXTURE_WRAP_S GL_CLAMP_TO_EDGE glTexParameteri GL_TEXTURE_2D GL_TEXTURE_WRAP_T GL_CLAMP_TO_EDGE glTexImage2D GL_TEXTURE_2D 0 GL_RGBA width height 0 GL_RGBA GL_UNSIGNED_BYTE NULL glGenFramebuffersOES 1 ResultFBO glBindFramebufferOES..

Why is this OpenGL ES code slow on iPhone?

http://stackoverflow.com/questions/450042/why-is-this-opengl-es-code-slow-on-iphone

sprite data is preloaded. 512x512 rgba8888 glGenTextures 1 spriteTexture glBindTexture GL_TEXTURE_2D spriteTexture glTexImage2D GL_TEXTURE_2D 0 GL_RGBA width height 0 GL_RGBA GL_UNSIGNED_BYTE spriteData free spriteData glTexParameteri GL_TEXTURE_2D..

Explain how OpenGL ES background images work

http://stackoverflow.com/questions/4820372/explain-how-opengl-es-background-images-work

CGContextTranslateCTM context 0 height height CGContextDrawImage context CGRectMake 0 0 width height image.CGImage glTexImage2D GL_TEXTURE_2D 0 GL_RGBA width height 0 GL_RGBA GL_UNSIGNED_BYTE imageData CGContextRelease context free imageData image..

GLImageProcessing Multiple Filters?

http://stackoverflow.com/questions/6425861/glimageprocessing-multiple-filters

GL_TEXTURE_2D GL_TEXTURE_WRAP_S GL_CLAMP_TO_EDGE glTexParameteri GL_TEXTURE_2D GL_TEXTURE_WRAP_T GL_CLAMP_TO_EDGE glTexImage2D GL_TEXTURE_2D 0 GL_RGBA wide high 0 GL_RGBA GL_UNSIGNED_BYTE NULL glGenFramebuffersOES 1 ResultFBO glBindFramebufferOES.. GL_TEXTURE_2D GL_TEXTURE_WRAP_S GL_CLAMP_TO_EDGE glTexParameteri GL_TEXTURE_2D GL_TEXTURE_WRAP_T GL_CLAMP_TO_EDGE glTexImage2D GL_TEXTURE_2D 0 GL_RGBA wide high 0 GL_RGBA GL_UNSIGNED_BYTE NULL glBindTexture GL_TEXTURE_2D stageTexture 1 glTexParameteri.. GL_TEXTURE_2D GL_TEXTURE_WRAP_S GL_CLAMP_TO_EDGE glTexParameteri GL_TEXTURE_2D GL_TEXTURE_WRAP_T GL_CLAMP_TO_EDGE glTexImage2D GL_TEXTURE_2D 0 GL_RGBA wide high 0 GL_RGBA GL_UNSIGNED_BYTE NULL GLuint stageFBO 2 glGenFramebuffersOES 2 stageFB0 glBindFramebufferOES..

iOS CVImageBuffer distorted from AVCaptureSessionDataOutput with AVCaptureSessionPresetPhoto

http://stackoverflow.com/questions/6540710/ios-cvimagebuffer-distorted-from-avcapturesessiondataoutput-with-avcapturesessio

GL_TEXTURE_2D GL_TEXTURE_WRAP_S GL_CLAMP_TO_EDGE glTexParameteri GL_TEXTURE_2D GL_TEXTURE_WRAP_T GL_CLAMP_TO_EDGE glTexImage2D GL_TEXTURE_2D 0 GL_RGBA bufferWidth bufferHeight 0 GL_BGRA GL_UNSIGNED_BYTE CVPixelBufferGetBaseAddress cameraFrame glBindBuffer.. issue. That is I believe that the buffer is being set correctly but with a format that this line doesn't understand glTexImage2D GL_TEXTURE_2D 0 GL_RGBA bufferWidth bufferHeight 0 GL_BGRA GL_UNSIGNED_BYTE CVPixelBufferGetBaseAddress cameraFrame My hunch.. CVPixelBufferGetBaseAddress pixelBuffer if captureSession sessionPreset isEqualToString @ AVCaptureSessionPresetPhoto glTexImage2D GL_TEXTURE_2D 0 GL_RGBA frameWidth frameHeight 0 GL_BGRA GL_UNSIGNED_BYTE NULL for int h 0 h frameHeight h GLubyte row..

Save OpenGL Drawn item as a Image

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

GL_TEXTURE_MIN_FILTER GL_LINEAR Specify a 2D texture image providing the a pointer to the image data in memory glTexImage2D GL_TEXTURE_2D 0 GL_RGBA width height 0 GL_RGBA GL_UNSIGNED_BYTE brushData Release the image data it's no longer needed..

Record the drawing as a m4v video file - OpenGL

http://stackoverflow.com/questions/9661259/record-the-drawing-as-a-m4v-video-file-opengl

GL_TEXTURE_MIN_FILTER GL_LINEAR Specify a 2D texture image providing the a pointer to the image data in memory glTexImage2D GL_TEXTURE_2D 0 GL_RGBA width height 0 GL_RGBA GL_UNSIGNED_BYTE brushData Release the image data it's no longer needed..