Available Methods
- glBindTexture ( )
- glGetUniformLocation ( )
- glEnableVertexAttribArray ( )
- glUniformMatrix4fv ( )
- glActiveTexture ( )
- glVertexAttribPointer ( )
- glUseProgram ( )
- glGetAttribLocation ( )
- glGenTextures ( )
- glUniform1i ( )
- glTexParameteri ( )
- glClear ( )
- glDrawArrays ( )
- glUniform1f ( )
- glViewport ( )
- glDeleteProgram ( )
- glCompileShader ( )
- glBindFramebuffer ( )
- glCreateProgram ( )
- glClearColor ( )
- glCreateShader ( )
- glLinkProgram ( )
- glAttachShader ( )
- glShaderSource ( )
- glDeleteTextures ( )
- glDisableVertexAttribArray ( )
- glGetShaderiv ( )
- glGetError ( )
- glGetProgramiv ( )
- glDeleteShader ( )
- glTexParameterf ( )
- glTexImage2D ( )
- glEnable ( )
- GL_NO_ERROR
- glBlendFunc ( )
- glDeleteFramebuffers ( )
- glFramebufferTexture2D ( )
- glBindBuffer ( )
- glDisable ( )
- glGenFramebuffers ( )
- glCheckFramebufferStatus ( )
- GL_TRUE
- glUniform2f ( )
- glUniform4fv ( )
- glDrawElements ( )
- GL_FRAMEBUFFER_COMPLETE
- glReadPixels ( )
- glGetIntegerv ( )
- glBufferData ( )
- glValidateProgram ( )
- GL_TEXTURE_2D ( )
- GL_FALSE
- glUniform2fv ( )
- glFinish ( )
- glGenBuffers ( )
- glFlush ( )
- glGetShaderInfoLog ( )
- glDeleteRenderbuffers ( )
- glDeleteBuffers ( )
- glGetString ( )
- glUniform3f ( )
- glRenderbufferStorage ( )
- glFramebufferRenderbuffer ( )
- glScissor ( )
- glBindAttribLocation ( )
- glGenRenderbuffers ( )
- glPixelStorei ( )
- glUniform4f ( )
- glUniform1fv ( )
- glUniformMatrix3fv ( )
- glGetProgramInfoLog ( )
- glBindRenderbuffer ( )
- GL_UNSIGNED_BYTE
- glUniform3fv ( )
- glTexSubImage2D ( )
- glCullFace ( )
- glDepthMask ( )
- GL_NEAREST
- glLineWidth ( )
- glGenerateMipmap ( )
- GL_TEXTURE0 ( )
- GL_RGBA
- glBlendColor ( )
- glDepthFunc ( )
- GL_RGB
- glBufferSubData ( )
- GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS
- GL_LINES
- glFrontFace ( )
- glIsProgram ( )
- GL_TEXTURE5 ( )
- GL_LINEAR_MIPMAP_NEAREST
- GL_FRAGMENT_SHADER
- GL_FRAMEBUFFER_UNSUPPORTED
- glUniform1iv ( )
- GL_UNSIGNED_SHORT_4_4_4_4 ( )
- GL_LINEAR
- GL_NEAREST_MIPMAP_NEAREST
- GL_FLOAT
- glIsTexture ( )
- GL_LUMINANCE
- GL_DEPTH_BUFFER_BIT
- GL_TEXTURE1 ( )
- GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
- glDetachShader ( )
- glHint ( )
- GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
- GL_TEXTURE8 ( )
- GL_LINE_LOOP
- GL_VERTEX_SHADER
- GL_TEXTURE3 ( )
- GL_TEXTURE6 ( )
- glUniform4iv ( )
- GL_DEPTH_COMPONENT16 ( )
Related Classes
- java.io.File
- java.io.InputStream
- android.content.Context
- android.util.Log
- java.io.FileOutputStream
- android.os.Build
- android.graphics.Color
- android.graphics.Canvas
- android.graphics.Bitmap
- java.nio.ByteBuffer
- android.annotation.TargetApi
- android.annotation.SuppressLint
- android.graphics.BitmapFactory
- android.os.Environment
- android.os.Looper
- java.util.logging.Level
- java.io.BufferedOutputStream
- android.graphics.RectF
- android.graphics.Matrix
- java.nio.ByteOrder
- androidx.annotation.NonNull
- android.view.Surface
- android.hardware.Camera
- java.nio.FloatBuffer
- android.graphics.SurfaceTexture
Java Code Examples for android.opengl.GLES20#GL_FRAGMENT_SHADER
The following examples show how to use
android.opengl.GLES20#GL_FRAGMENT_SHADER .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ShaderProgram.java From Spectaculum with Apache License 2.0 | 6 votes |
public static int loadShader(int type, String shaderCode) { if(type != GLES20.GL_VERTEX_SHADER && type != GLES20.GL_FRAGMENT_SHADER) { throw new InvalidParameterException("invalid shader type"); } int handle = GLES20.glCreateShader(type); if(handle != 0) { GLES20.glShaderSource(handle, shaderCode); GLES20.glCompileShader(handle); int[] compileStatus = new int[1]; GLES20.glGetShaderiv(handle, GLES20.GL_COMPILE_STATUS, compileStatus, 0); if (compileStatus[0] != GLES20.GL_TRUE) { Log.e(TAG, "Error compiling shader: " + GLES20.glGetShaderInfoLog(handle)); deleteShader(handle); handle = 0; } } else { GLUtils.checkError("glCreateShader"); } return handle; }
Example 2
Source File: OGLESShaderRenderer.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 5 votes |
public int convertShaderType(ShaderType type) { switch (type) { case Fragment: return GLES20.GL_FRAGMENT_SHADER; case Vertex: return GLES20.GL_VERTEX_SHADER; // case Geometry: // return ARBGeometryShader4.GL_GEOMETRY_SHADER_ARB; default: throw new RuntimeException("Unrecognized shader type."); } }
Example 3
Source File: RRGLProgram.java From RedReader with GNU General Public License v3.0 | 5 votes |
private void compileAndAttachShader(final int type, final String source) { switch(type) { case GLES20.GL_FRAGMENT_SHADER: if(mFragmentShaderHandle != null) throw new RuntimeException(); break; case GLES20.GL_VERTEX_SHADER: if(mVertexShaderHandle != null) throw new RuntimeException(); break; default: throw new RuntimeException("Unknown shader type."); } final int shaderHandle = GLES20.glCreateShader(type); if(shaderHandle == 0) { throw new RuntimeException("Error creating shader."); } GLES20.glShaderSource(shaderHandle, source); GLES20.glCompileShader(shaderHandle); final int[] compileStatus = new int[1]; GLES20.glGetShaderiv(shaderHandle, GLES20.GL_COMPILE_STATUS, compileStatus, 0); if(compileStatus[0] == 0) { final String log = GLES20.glGetShaderInfoLog(mHandle); GLES20.glDeleteShader(shaderHandle); throw new RuntimeException(String.format(Locale.US, "Shader compile error: \"%s\".", log)); } GLES20.glAttachShader(mHandle, shaderHandle); switch(type) { case GLES20.GL_FRAGMENT_SHADER: mFragmentShaderHandle = shaderHandle; break; case GLES20.GL_VERTEX_SHADER: mVertexShaderHandle = shaderHandle; break; default: throw new RuntimeException("Unknown shader type."); } }