I am writing a game in Java, LJGWL (OpenGL). I use a library that handles a lot of messy details for me, but I need to find a much faster way to do this.
Basically, I want to set every pixel on the screen to say random color as quickly as possible. "Random colors" is just an array [] [], which is updated every 2-3 seconds. I tried drawing rectangles and using images, both pretty slow for what I want to do.
I think I want to learn how to write a graphic shader? Is this the fastest way to do this? LJGWL provides OpenGL api for java. Any basic guides for getting started with OpenGL shaders? Or should I dynamically create some kind of texture and then just throw away the whole texture, will it be faster?
source
share