I´m working with game and need to use swing components on top of GLCanvas.
(or at least somehow show swing components on top of GLCanvas).
I´am using gl.glReadPixels(…) to read the framebuffer and then painting the framebuffer´s data
as image to JPanel´s background. Unfortunately glReadPixels(…) is too slow to be used with each game
frame if it´s called with GL.GL_RGB. It´s fast if its called with GL_COLOR_INDEX but I don´t know how to use
data obtained with GL_COLOR_INDEX.
Questions:
Well, what is that color index?
Is it possible to get RGB value from color index?