Is it possible to add GLSL Shaders to android Canvas?

Viewed 34

I was making my 2D game using Canvas (android.graphics) in android studio. I wanted to add some kind of bloom effect to the objects in a game, easiest way for me to do that would be linking GLSL shader. Sadly I can't find any function that would allow me to do that.

Is there any way to implement GLSL into android's Canvas? If there isn't what graphics library for android has this option? (I've already tried OpenGL ES 2.0, but all I was able to do was simple triangle and it was really hard, so I think i'm too stupid for this engine)

1 Answers

As you may know, GLSL (OpenGL Shading Language) is for OpenGL. And,

The Basics:

There are two foundational classes in the Android framework that let you create and manipulate graphics with the OpenGL ES API: GLSurfaceView and GLSurfaceView.Renderer.

The framework gives you the only option to manipulate with the OpenGL: GLSurfaceView and GLSurfaceView.Renderer. Canvas is not the option.

The Basics:

If your goal is to use OpenGL in your Android application, understanding how to implement these classes in an activity should be your first objective.

Related