Open brandonborkholder opened 12 years ago
In your humble opinion, which functionalities are particularly difficult to implement in the fixed pipeline but very easy to implement in the shader based pipeline? I hope you won't drop the former.
I haven't found anything that easier to implement in a shader than it is on the CPU. However, I'd like to build a shader pipeline so that glg2d is usable on mobile devices with OpenGL ES. I also think that some things can be faster in a shader than on the GPU. For example, StrokeShader.ghttps://github.com/brandonborkholder/glg2d/blob/master/src/main/java/glg2d/impl/shader/StrokeShader.gtakes a path and draws it using the properties for a BasicStroke object. This could be optimized even more using NVidia's Path api.
Graphics2D.setPaint(Paint) is one method that may be easier with a shader (if you give it some non-constant color). But I haven't implemented this yet and am not sure that's true.
However, rest assured I'm not dropping the fixed function pipeline (using GL2 profile). I know that some people using glg2d are using it on old hardware and don't have the latest video hardware.
You speak about mobile devices. Is it possible to build GLG2D without AWT?
Not without AWT. I'm assuming that you have the full JVM, but only OpenGL ES2.
Initial work has already been done on a shader-based pipeline, see e9db0c1043be735f0bd68d19058bf2e7a915f7ff. We should extend this to cover the entire functionality of java.awt.Graphics2D.