Android examples for android.opengl:OpenGL Shader
compile opengl Fragment Shader
//package com.java2s; import android.opengl.GLES20; public class Main { public static int compileFragmentShader(String shaderCode) { return compileShader(GLES20.GL_FRAGMENT_SHADER, shaderCode); }//from ww w . j av a 2 s.c o m private static int compileShader(int type, String shaderCode) { final int shader = GLES20.glCreateShader(type); GLES20.glShaderSource(shader, shaderCode); GLES20.glCompileShader(shader); return shader; } }