Hello Guest

Screenshots using GPU.

  • 1 Replies
Screenshots using GPU.
« on: May 28, 2020, 16:41:14 »
I have created a PC Ambilight project.

This project basically capture the screen image, and sends an encoded version of the "screen colors" to a microcontroller that display that colors to a led strip.

This are the project involved for the purpose

and this the result:

As you can see I use the AWT Robot Java class to capture the screen, it works well and with the right numbers of threads it works even fast.
The problem is that the robot class creates "some stutter" on slow CPUs and it's really CPU intensive if pushed that hard with threads.

Is there a way to get a simple screenshot using LWJGL and the GPU and put that screenshot in a BufferedImage?



Offline abcdef

  • ****
  • 335
Re: Screenshots using GPU.
« Reply #1 on: June 09, 2020, 12:38:02 »
Sounds like a fun project!

LWJGL needs you to create a window (using GLFW) and that is the window context you have access to. I don't believe you can get access to the screen as a whole.