¡@

Home 

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

iphone Programming Glossary: gl_unsigned_byte

OpenGL ES 2d rendering into image

http://stackoverflow.com/questions/10455329/opengl-es-2d-rendering-into-image

GLubyte malloc totalBytesForImage glReadPixels 0 0 int currentFBOSize.width int currentFBOSize.height GL_RGBA GL_UNSIGNED_BYTE rawImagePixels Do something with the image free rawImagePixels The second and much faster way of doing this is to render.. GL_TEXTURE_2D GL_RGBA opengl format int imageSize.width int imageSize.height GL_BGRA native iOS format GL_UNSIGNED_BYTE 0 renderTexture CFRelease attrs CFRelease empty glBindTexture CVOpenGLESTextureGetTarget renderTexture CVOpenGLESTextureGetName..

OpenGL ES iPhone - drawing anti aliased lines

http://stackoverflow.com/questions/1813035/opengl-es-iphone-drawing-anti-aliased-lines

along this way Colors is a pointer to unsigned bytes 4 per color . Should alternate in opacity. glColorPointer 4 GL_UNSIGNED_BYTE 0 colors glEnableClientState GL_COLOR_ARRAY points is a pointer to floats 2 per vertex glVertexPointer 2 GL_FLOAT 0 points..

Draw to offscreen renderbuffer in OpenGL ES (iPhone)

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

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 GL_TEXTURE_2D canvastexture 0 GLenum status glCheckFramebufferStatusOES..

fastest way to draw a screen buffer on the iphone

http://stackoverflow.com/questions/2395650/fastest-way-to-draw-a-screen-buffer-on-the-iphone

texture because it needs to be a power of two just the call of glTexSubImage2D GL_TEXTURE_2D 0 0 0 512 512 GL_RGBA GL_UNSIGNED_BYTE baseWindowGUI GetBuffer seemed pretty much responsible for ALL the slow down. commenting it out and leaving in all my software..

render to floating point texture under iOS

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

glCheckFramebufferStatus GL_FRAMEBUFFER this asserts This works fine when replacing GL_HALF_FLOAT_OES with GL_UNSIGNED_BYTE . Is this a limitation with iOS or am I doing something incorrectly iphone opengl es share improve this question I..

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_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 GL_FRAMEBUFFER_OES ResultFBO glFramebufferTexture2DOES GL_FRAMEBUFFER_OES..

GLImageProcessing Multiple Filters?

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

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_FRAMEBUFFER_OES ResultFBO glFramebufferTexture2DOES GL_FRAMEBUFFER_OES.. 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_MAG_FILTER GL_NEAREST 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 GL_FRAMEBUFFER_OES stageFBO 0 glFramebufferTexture2DOES..

iOS CVImageBuffer distorted from AVCaptureSessionDataOutput with AVCaptureSessionPresetPhoto

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

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 GL_ARRAY_BUFFER self vertexBuffer glBindBuffer GL_ELEMENT_ARRAY_BUFFER.. 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 was that changing the external format from GL_BGRA to something else would.. 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 pixelBufferAddr h frameWidth 4 extraBytes glTexSubImage2D GL_TEXTURE_2D 0..

Faster alternative to glReadPixels in iPhone OpenGL ES 2.0

http://stackoverflow.com/questions/9550297/faster-alternative-to-glreadpixels-in-iphone-opengl-es-2-0

GL_TEXTURE_2D GL_RGBA opengl format int videoSize.width int videoSize.height GL_BGRA native iOS format GL_UNSIGNED_BYTE 0 renderTexture glBindTexture CVOpenGLESTextureGetTarget renderTexture CVOpenGLESTextureGetName renderTexture glTexParameterf..

Capturing EAGLview content WITH alpha channel on iPhone

http://stackoverflow.com/questions/962390/capturing-eaglview-content-with-alpha-channel-on-iphone

with you I found somewhere else CGImageRef glToUIImage unsigned char buffer 320 480 4 glReadPixels 0 0 320 480 GL_RGBA GL_UNSIGNED_BYTE buffer CGDataProviderRef ref CGDataProviderCreateWithData NULL buffer 320 480 4 NULL CGImageRef iref CGImageCreate 320 480..

Record the drawing as a m4v video file - OpenGL

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

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 free brushData Set the view's scale factor self.contentScaleFactor.. GLubyte CVPixelBufferGetBaseAddress pixel_buffer glReadPixels 0 0 videoSize.width videoSize.height GL_RGBA GL_UNSIGNED_BYTE pixelBufferData May need to add a check here because if two consecutive times with the same value are added to the movie..

Saving imageRef from GLPaint creates completely black image

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

s allocate array and read pixels into it. GLubyte buffer GLubyte malloc myDataLength glReadPixels 0 0 w s h s GL_RGBA GL_UNSIGNED_BYTE buffer gl renders upside down so swap top to bottom into new array. there's gotta be a better way but this works. GLubyte..