This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

glReadPixels generates OUT_OF_MEMORY error

Hi.

Usually, I use render-to-texture technique to process the image.

However, recently, I need to read the contents to the system memory.

So, I tried to use glReadPixels as follows:

GLubyte pixels[256] = { 0, 0, 0, 0 };

GL_CHECK( glReadPixels(100, 100, 2, 2, GL_RGBA, GL_UNSIGNED_BYTE, pixels) );

LOGI("%d %d %d %d\n", pixels[0], pixels[1], pixels[2], pixels[3]);

This code works well on my desktop PC with NVIDIA card.

But, it fails with ARM Mali-T628.

Debug: test0clear.cpp:36: glGetError() = OUT_OF_MEMORY at test0clear.cpp:36

Here is the details of my system:

EGL vendor = ARM

EGL version = 1.4 Midgard-"r4p0-02rel0"

EGL client apis = OpenGL_ES

GL ES vendor = ARM

GL ES version = OpenGL ES 3.0

GL ES renderer = Mali-T628

GL ES SL version = OpenGL ES GLSL ES 3.00

Do you have any idea to overcome this abnormal situation?

Thanks in advance.

--

oceancru

Parents
  • Hi Oceancru,

    Thank you for the code snippet you provided. Before I investigate the issue I was wondering if you could tell me more about the Ubuntu distribution you are currently running. As the Odroid XU3 only started shipping 2 days ago, I am guessing that you have access to pre release hardware? If this is the case where did you get the binary from? If it is directly from hard kernel, can you tell me which version you are using?

    Cheers,

    Stephen

Reply
  • Hi Oceancru,

    Thank you for the code snippet you provided. Before I investigate the issue I was wondering if you could tell me more about the Ubuntu distribution you are currently running. As the Odroid XU3 only started shipping 2 days ago, I am guessing that you have access to pre release hardware? If this is the case where did you get the binary from? If it is directly from hard kernel, can you tell me which version you are using?

    Cheers,

    Stephen

Children
No data