readPixelColor

fun readPixelColor(x: Int, y: Int, result: Color): Color

Reads the fragment color at a screen point in the currently active OpenGL frame buffer. The X and Y components indicate OpenGL screen coordinates, which originate in the frame buffer's lower left corner.

Return

the result argument set to the fragment color, or a new color if the result is null

Parameters

x

the screen point's X component

y

the screen point's Y component

result

an optional pre-allocated Color in which to return the fragment color, or null to return a new color