Login  Register

Re: Why does the RGB value always equal to (0, 0, 0) when I use gl2.glReadPixels(e.x, viewport[3] - e.y, 1, 1, GL2.GL_RGB, GL2.GL_FLOAT, FloatBuffer.wrap(color));

Posted by elect on Mar 18, 2016; 7:53am
URL: https://forum.jogamp.org/Why-does-the-RGB-value-always-equal-to-0-0-0-when-I-use-gl2-glReadPixels-e-x-viewport-3-e-y-1-1-GL2--tp4036511p4036512.html

Because it means at that moment when you read that pixel that is its value.

You should read this to understand problems of deprecated (fixed function) opengl and benefits of the current one