| Start |
|---|
| Setting up GLSurfaceView and OpenGL ES 2.0+ To use OpenGL ES in your application you must add this to the manifest: Create your extended GLSurfaceView: Add To use newer version of OpenGL ES (opens new window) just change the version number in your manifest, in the static import and change |
| Compiling and Linking GLSL-ES Shaders from asset file The Assets (opens new window) folder is the most common place to store your GLSL-ES shader files. To use them in your OpenGL ES application you need to load them to a string in the first place. This functions creates a string from the asset file: Now you need to create a function that compiles a shader stored in a sting: Now you can load, compile and link your shaders: If there are no errors, your shader program is ready to use: |
Read Article
https://develop.horje.com/learn/1434/reference