Answer the question
In order to leave comments, you need to log in
Where can I find simple examples of calculations using shaders in opengl?
Please help with literature links for using Open GL shaders as an accelerator for massively parallel calculations. There is a lot of literature on the net about both shaders and GL, but I can’t find the problem in this form in search engines (honestly, I searched for a long time). The main goal is to study how much it is possible to accelerate self-written algorithms on video processors that are put in ARM chips.
Accordingly, I ask you to advise on the network where you can see an example in pure OpenGL (without libraries, this is important, the establishment of a library is not always possible and easy on chips from the Chinese) of this kind:
transferring an array of data from RAM to a video card -> writing the most primitive mathematics for processing them (even adding a constant) -> returning data back to the program
I ask you not to bother directly with the solution, just if someone has links to a ready-made example or poke their nose into the documentation on how this can be done.
Answer the question
In order to leave comments, you need to log in
Compute shaders about calculations. But they may not be supported everywhere.
I would recommend looking for solutions similar to your problems on gpu.
And so you can see how to work with offscreen rendering. Calculating simple math won't be much different from typical rendering tasks. Usually a rectangle is drawn on the entire "screen" and counted in the fragment shader.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question