OpenGL ES 2.0 Android - Color Picking
问题 I'm trying to implement color picking using GLES20.glReadPixels function in android OpenGL ES. The problem is that this function is always returning 0,0,0,0 as color and not the correct color values. Any idea why? My code looks like this: public boolean onTouchEvent(MotionEvent event) { if (event != null) { float x = event.getX(); float y = event.getY(); if (event.getAction() == MotionEvent.ACTION_UP) { int newX = (int)x; int newY = (int)y; ByteBuffer pixel = ByteBuffer.allocate(4); pixel