C language function:glReadPixels sample codes

Search sample code in the internet.It is the result.


TITLE : samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/MatrixTrackingGL.java - platform/development - Git at Google
public void glReadPixels(int x, int y, int width, int height, int format,.......
http://android.googlesource.com/platform/development/+/master/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/MatrixTrackingGL.java


TITLE : samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/MatrixTrackingGL.java - platform/development - Git at Google
mgl.glReadPixels(x, y, width, height, format, type, pixels);.......
http://android.googlesource.com/platform/development/+/master/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/MatrixTrackingGL.java
TITLE : glReadPixels from a RenderTexture - Unity Answers
glReadPixels(0, 0, textureWidth, textureHeight, GL_RGBA, GL_FLOAT, data);.......
http://answers.unity3d.com/questions/1305191/glreadpixels-from-a-rendertexture.html
TITLE : glReadPixels from a RenderTexture - Unity Answers
glReadPixels(readPixelsX, readPixelsY, readPixelsWidth, readPixelsHeight, readPixelsFormat, readPixelsType, readPixelsDestination);.......
http://answers.unity3d.com/questions/1305191/glreadpixels-from-a-rendertexture.html
TITLE : Android MediaCodec stuff
Buffer-to-surface. Encoding is again done from software-generated YUV data in ByteBuffers, but this time decoding is done to a Surface. Output is checked with OpenGL ES, using glReadPixels()........
http://bigflake.com/mediacodec/
TITLE : Android MediaCodec stuff
Extracts the first 10 frames of video from a .mp4 file and saves them to individual PNG files in /sdcard/. Uses MediaExtractor to extract the CSD data and feed individual access units into a MediaCodec decoder. The frames are decoded to a Surface created from SurfaceTexture, rendered (off-screen) into a pbuffer, extracted with glReadPixels(), and saved to a PNG file with Bitmap#compress()........
http://bigflake.com/mediacodec/
TITLE : Android MediaCodec stuff
* 1.5% glReadPixels() into a direct ByteBuffer.......
http://bigflake.com/mediacodec/
TITLE : Miles Macklin » Blog Archive » Real-Time Video Capture with FFmpeg
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);.......
http://blog.mmacklin.com/2013/06/11/real-time-video-capture-with-ffmpeg/
TITLE : Texture input to video encoder? | NXP Community
Andre, I noticed that in another thread with a similar topic, you suggested the use of virtual framebuffer. So if I use OpenGL ES to render the textured plane into a virtual framebuffer and somehow pass the framebuffer's address to video encoder, would that it essence let me skip the glReadPixels() step?.......
http://community.nxp.com/thread/309677
TITLE : Texture input to video encoder? | NXP Community
Setup EGL on this framebuffer ( eglCreateWindowSurface(eglDisplay, eglConfig, vfb_id, NULL); ) here you only use eglSwapBuffer() instead of glReadPixels()........
http://community.nxp.com/thread/309677
TITLE : OpenGL ESで似非マウスピッキング - Schlechte Welt
gl.glReadPixels(mMouseX, getHeight()-mMouseY, 1, 1, GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE, bf1); .......
http://d.hatena.ne.jp/s_welt/20071124/1195903942
TITLE : OpenGL ESで似非マウスピッキング - Schlechte Welt
gl.glReadPixels(mMouseX, getHeight()-mMouseY, 1, 1, GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE, bf2);.......
http://d.hatena.ne.jp/s_welt/20071124/1195903942
TITLE : GLES30 | Android Developers
static void glReadPixels(int x, int y, int width, int height, int format, int type, int offset).......
http://developer.android.com/reference/android/opengl/GLES30.html
TITLE : GLES30 | Android Developers
static void glReadPixels(int x, int y, int width, int height, int format, int type, Buffer pixels).......
http://developer.android.com/reference/android/opengl/GLES30.html
TITLE : Technical Note TN2093: OpenGL Performance Optimization : The Basics
Reading pixels back from the frame buffer in OpenGL is commonly accomplished with the glReadPixels() API. Understanding how this command functions is key to achieving good application performance when buffer read back is required........
http://developer.apple.com/library/content/technotes/tn2093/_index.html
TITLE : QOpenGLFunctions_4_3_Compatibility Class | Qt GUI 5.9
QOpenGLBuffer::PixelPackBuffer 0x88EB Pixel pack buffer object for reading pixel data from the OpenGL server (for example, with glReadPixels()). Not supported under OpenGL/ES........
http://doc.qt.io/qt-5/qopenglbuffer.html
TITLE : QOpenGLFunctions_4_3_Compatibility Class | Qt GUI 5.9
void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels).......
http://doc.qt.io/qt-5/qopenglfunctions-3-2-compatibility.html
TITLE : QOpenGLFunctions_4_3_Compatibility Class | Qt GUI 5.9
void QOpenGLFunctions_3_2_Compatibility::glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels).......
http://doc.qt.io/qt-5/qopenglfunctions-3-2-compatibility.html
TITLE : QOpenGLFunctions_4_3_Compatibility Class | Qt GUI 5.9
void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels).......
http://doc.qt.io/qt-5/qopenglfunctions-4-3-compatibility.html
TITLE : QOpenGLFunctions_4_3_Compatibility Class | Qt GUI 5.9
void QOpenGLFunctions_4_3_Compatibility::glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels).......
http://doc.qt.io/qt-5/qopenglfunctions-4-3-compatibility.html
TITLE : OpenCV: Use OpenCL in Android camera preview based CV application
After that we can read (copy) pixel data from C/C++ via glReadPixels() and write them back to texture after modification via glTexSubImage2D()........
http://docs.opencv.org/trunk/d7/dbd/tutorial_android_ocl_intro.html
TITLE : OpenGL Programming/Object selection - Wikibooks, open books for an open world
For both techniques, we will need to read back information from the framebuffer after we have drawn our 3D scene. We do not need to read back the whole framebuffer, we just want to know what is at the pixel on which we clicked with the mouse. We can register a callback with GLUT to get the mouse position whenever you click, and use the glReadPixels() function to find out what is at that pixel. To register the callback, use:.......
http://en.wikibooks.org/wiki/OpenGL_Programming/Object_selection
TITLE : OpenGL Programming/Object selection - Wikibooks, open books for an open world
glReadPixels(x, window_height - y - 1, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, color);.......
http://en.wikibooks.org/wiki/OpenGL_Programming/Object_selection
TITLE : OpenGL Programming/Object selection - Wikibooks, open books for an open world
glReadPixels(x, window_height - y - 1, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &depth);.......
http://en.wikibooks.org/wiki/OpenGL_Programming/Object_selection
TITLE : OpenGL Programming/Object selection - Wikibooks, open books for an open world
glReadPixels(x, window_height - y - 1, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_INT, &index);.......
http://en.wikibooks.org/wiki/OpenGL_Programming/Object_selection
TITLE : Ray Picking
glReadPixels(mouseX, (int)winY, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, winZ);.......
http://forum.lwjgl.org/index.php@topic=4867.0
TITLE : Can I direct the output to Framebuffer 1 - raylib forum
) Retrieve OpenGL ES framebuffer with glReadPixels() (copy pixels data from GPU VRAM to CPU RAM, the same I do to take a screenshot), once the frame is on RAM, it can be copied anywhere (fb1). The problem is that glReadPixels() is a very slow function and application frame drop could be considerable... It should be tested but I think that for a small screen resolution (640x480) it could be viable........
http://forum.raylib.com/index.php@p=%2Fdiscussion%2F87%2Fcan-i-direct-the-output-to-framebuffer-1
TITLE : Can I direct the output to Framebuffer 1 - raylib forum
Some more investigation... looking for faster alternative to glReadPixels(): https://vec.io/posts/faster-alternatives-to-glreadpixels-and-glteximage2d-in-opengl-es.......
http://forum.raylib.com/index.php@p=%2Fdiscussion%2F87%2Fcan-i-direct-the-output-to-framebuffer-1
TITLE : how i get screen capture « Sparrow Forum
glReadPixels(myX, myY, myWidth, myHeight, GL_RGBA, GL_UNSIGNED_BYTE, &buffer);.......
http://forum.sparrow-framework.org/topic/how-i-get-screen-capture
TITLE : how i get screen capture « Sparrow Forum
glReadPixels(0, (Sparrow.stage.height*contentScaleFactor)-height, width, height, GL_RGBA, GL_UNSIGNED_BYTE, &buffer);.......
http://forum.sparrow-framework.org/topic/how-i-get-screen-capture
TITLE : c++ - How do I get the correct values from glReadPixels in OpenGL 3.0? - Game Development Stack Exchange
As you can see I'm not able to get the correct values from glReadPixels();.......
http://gamedev.stackexchange.com/questions/29977/how-do-i-get-the-correct-values-from-glreadpixels-in-opengl-3-0
TITLE : c++ - How do I get the correct values from glReadPixels in OpenGL 3.0? - Game Development Stack Exchange
glReadPixels(pos.x, SCREEN_HEIGHT - 1 - pos.y, 1, 1, GL_RGB, GL_UNSIGNED_BYTE, &pixel[0] );.......
http://gamedev.stackexchange.com/questions/29977/how-do-i-get-the-correct-values-from-glreadpixels-in-opengl-3-0
TITLE : glReadPixels in PixelBuffer Class 揃 Issue #129 揃 CyberAgent/android-gpuimage 揃 GitHub
mGL.glReadPixels(0, 0, mWidth, mHeight, GL_RGBA, GL_UNSIGNED_BYTE, ib);.......
http://github.com/CyberAgent/android-gpuimage/issues/129
TITLE : glReadPixels in PixelBuffer Class 揃 Issue #129 揃 CyberAgent/android-gpuimage 揃 GitHub
@JesseScott did you accomplish the FBO solution? glReadPixels() is very very slow and can't apply in real time video application........
http://github.com/CyberAgent/android-gpuimage/issues/129
TITLE : [android-ndk] GraphicBuffer - Grokbase
Michael I have also been trying to find an alternative to using the notoriously slow glReadPixels() in order to get GPU textures copied to CPU memory, which seems to be the only officially supported way to achieve this. While there are several examples out on the web that attempt to use GraphicBuffer, it probably won't be worth trying to implement them for your case. I've been there and can say: don't go there if you don't really have to. Not only will you have to deal with dynamically loading.......
http://grokbase.com/t/gg/android-ndk/137dcfbr17/graphicbuffer
TITLE : [android-ndk] GraphicBuffer - Grokbase
slow glReadPixels() in order to get GPU textures copied to CPU memory,.......
http://grokbase.com/t/gg/android-ndk/137dcfbr17/graphicbuffer
TITLE : [android-ndk] GraphicBuffer - Grokbase
in some instances and glReadPixels() in others. (Unless you want to.......
http://grokbase.com/t/gg/android-ndk/137dcfbr17/graphicbuffer
TITLE : [android-ndk] GraphicBuffer - Grokbase
significant and noticeable speedup compared to using glReadPixels() on the.......
http://grokbase.com/t/gg/android-ndk/137dcfbr17/graphicbuffer
TITLE : [android-ndk] GraphicBuffer - Grokbase
One could argue that glReadPixels() should be the function to do this, but.......
http://grokbase.com/t/gg/android-ndk/137dcfbr17/graphicbuffer
TITLE : Reading the OpenGL backbuffer to system memory
glReadPixels(0, 0, smallWidth, smallHeight, GL_RGBA, GL_UNSIGNED_BYTE, downsampleData);.......
http://lektiondestages.blogspot.com/2013/01/reading-opengl-backbuffer-to-system.html
TITLE : Reading the OpenGL backbuffer to system memory
glReadPixels(0, 0, downsample->getWidth(), downsample->getHeight(), GL_RGBA, GL_UNSIGNED_BYTE, nullptr);.......
http://lektiondestages.blogspot.com/2013/01/reading-opengl-backbuffer-to-system.html
TITLE : WebGL, Blending, and Why You're Probably Doing it Wrong
A WebGL canvas is just another (potentially transparent) element on a page. It is always composited over the page by your browser. The browser defaults to compositing a WebGL canvas using premultiplied alpha, because like we talked about above, your colors come out of the WebGL renderer in premultiplied form. Unless you’re consciously preventing it, when you call glReadPixels(), the image you get back is a premultiplied image........
http://limnu.com/webgl-blending-youre-probably-wrong/
TITLE : OpenGL ES 2.0/3.0 Offscreen rendering with glRenderbuffer – Matt's Homepage
Thankfully, I found this article and thought I’d copy the information here since it’s the only place I’ve seen working code that demonstrated the technique. It also includes the very important step of reading the output format and uses glReadPixels() so you can validate that you were writing correctly to the offscreen renderbuffer surface........
http://mattfife.com/@p=2813
TITLE : OpenGL ES 2.0/3.0 Offscreen rendering with glRenderbuffer – Matt's Homepage
glReadPixels(0,0,renderBufferWidth,renderBufferHeight,GL_RGB, GL_RGB565, data);.......
http://mattfife.com/@p=2813
TITLE : mkonrad.net: ~/blog - Android off-screen rendering using EGL pixelbuffers and OpenGL ES 2.0
Call these functions at the beginning and end of your activity life-cycle, respectively. During application run-time you can now use the gl...() rendering functions to render some graphics off-screen into the pixelbuffer. You might use glReadPixels() to copy the rendered image data to a ByteBuffer. You can then construct an Android Bitmap from it by using Bitmap.copyPixelsFromBuffer()........
http://mkonrad.net/2014/12/08/android-off-screen-rendering-using-egl-pixelbuffers.html
TITLE : glReadPixels function (Windows)
void WINAPI glReadPixels(.......
http://msdn.microsoft.com/ja-jp/library/windows/desktop/dd374016(v=vs.85).aspx
TITLE : OpenGL Optimizations in an FFmpeg Filter – Nervous Systems
glReadPixels(0, 0, inl->w, inl->h, GL_RGB, GL_UNSIGNED_BYTE, 0);.......
http://nervous.io/ffmpeg/opengl/2017/05/15/ffmpeg-pbo-yuv/
TITLE : pygame.image.fromstring - Nullege Python Samples
data = glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE).......
http://nullege.com/codes/search/pygame.image.fromstring
TITLE : pygame.image.fromstring - Nullege Python Samples
data = glReadPixels(0, 0, win.width, win.height, GL_RGB, GL_UNSIGNED_BYTE).......
http://nullege.com/codes/search/pygame.image.fromstring
TITLE : glReadPixels : PyOpenGL 3.1.0 GL Man Pages
glReadPixels( GLint ( x ) , GLint ( y ) , GLsizei ( width ) , GLsizei ( height ) , GLenum ( format ) , GLenum ( type ) , GLvoid * ( data ) )-> void.......
http://pyopengl.sourceforge.net/documentation/manual-3.0/glReadPixels.html
TITLE : glReadPixels : PyOpenGL 3.1.0 GL Man Pages
glReadPixels( x , y , width , height , format , type , array = None , outputType = ).......
http://pyopengl.sourceforge.net/documentation/manual-3.0/glReadPixels.html
TITLE : glReadPixels : PyOpenGL 3.1.0 GL Man Pages
glReadPixelss( x , y , width , height , format , type = GL_SHORT , array = None , outputType = ).......
http://pyopengl.sourceforge.net/documentation/manual-3.0/glReadPixels.html
TITLE : Complete Python OpenGL examples
screenshot = glReadPixels( 0,0, 800, 600, GL_RGBA, GL_UNSIGNED_BYTE).......
http://python-opengl-examples.blogspot.com/
TITLE : Complete Python OpenGL examples
jpg_file_write("helix/helix", t, glReadPixels( 0,0, 800, 600, GL_RGBA, GL_UNSIGNED_BYTE)).......
http://python-opengl-examples.blogspot.com/
TITLE :
So remember that glReadPixels() works differently when a GL_PIXEL_PACK_BUFFER is bound. When a PBO is bound the glReadPixels() call will trigger GL to write the data of the currently bound read framebuffer into the bound PBO........
http://roxlu.com/2014/048/fast-pixel-transfers-with-pixel-buffer-objects
TITLE :
glReadPixels(0, 0, width, height, fmt, GL_UNSIGNED_BYTE, 0);.......
http://roxlu.com/2014/048/fast-pixel-transfers-with-pixel-buffer-objects
TITLE :
One last thing I want to share, is the fact that you pass zero as the last parameter to glReadPixels(). You can pass any value in there. The value you pass is used as a byte offset into the currently bound PBO........
http://roxlu.com/2014/048/fast-pixel-transfers-with-pixel-buffer-objects
TITLE :
glReadPixels(0, 0, width, height, fmt, GL_UNSIGNED_BYTE, 0); /* When a GL_PIXEL_PACK_BUFFER is bound, the last 0 is used as offset into the buffer to read into. */.......
http://roxlu.com/2014/048/fast-pixel-transfers-with-pixel-buffer-objects
TITLE :
SX_DEBUG("glReadPixels() with pbo: %d", pbos[dx]);.......
http://roxlu.com/2014/048/fast-pixel-transfers-with-pixel-buffer-objects
TITLE :
glReadPixels(0, 0, width, height, fmt, GL_UNSIGNED_BYTE, 0);.......
http://roxlu.com/2014/048/fast-pixel-transfers-with-pixel-buffer-objects
TITLE :
glReadPixels(0, 0, width, height, fmt, GL_UNSIGNED_BYTE, pixels);.......
http://roxlu.com/2014/048/fast-pixel-transfers-with-pixel-buffer-objects
search Google

https://www.google.com/#q=glReadPixels