compile opengl Shader - Android android.opengl

Android examples for android.opengl:OpenGL Shader

Description

compile opengl Shader

Demo Code


//package com.java2s;

import android.opengl.GLES20;

public class Main {
    private static int compileShader(int type, String shaderCode) {
        final int shader = GLES20.glCreateShader(type);
        GLES20.glShaderSource(shader, shaderCode);
        GLES20.glCompileShader(shader);/*from   w w w .  j  a  v a 2s  . c om*/
        return shader;
    }
}

Related Tutorials