Skip to content
This repository has been archived by the owner on Jan 14, 2023. It is now read-only.

implement a shader-based pipeline #3

Open
brandonborkholder opened this issue Mar 4, 2012 · 4 comments
Open

implement a shader-based pipeline #3

brandonborkholder opened this issue Mar 4, 2012 · 4 comments
Assignees

Comments

@brandonborkholder
Copy link
Owner

Initial work has already been done on a shader-based pipeline, see e9db0c1. We should extend this to cover the entire functionality of java.awt.Graphics2D.

@ghost
Copy link

ghost commented Aug 31, 2012

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.

@brandonborkholder
Copy link
Owner Author

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.

@ghost
Copy link

ghost commented Mar 20, 2013

You speak about mobile devices. Is it possible to build GLG2D without AWT?

@brandonborkholder
Copy link
Owner Author

Not without AWT. I'm assuming that you have the full JVM, but only OpenGL
ES2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant