¡@

Home 

2014/10/16 ¤W¤È 08:14:17

android Programming Glossary: gles20.glbindtexture

Framebuffer FBO render to texture is very slow, using OpenGL ES 2.0 on Android, why?

http://stackoverflow.com/questions/10729352/framebuffer-fbo-render-to-texture-is-very-slow-using-opengl-es-2-0-on-android

the frame buffer GLES20.glGenTextures 1 renderTex offset GLES20.glBindTexture GLES20.GL_TEXTURE_2D renderTex offset GLES20.glTexImage2D GLES20.GL_TEXTURE_2D.. ids to switch to them when I need. My drawing code GLES20.glBindTexture GLES20.GL_TEXTURE_2D textureId ShaderProgram program glgame.getProgram..

YUV to RGB conversion by fragment shader

http://stackoverflow.com/questions/12130790/yuv-to-rgb-conversion-by-fragment-shader

make sure you do GLES20.glActiveTexture GLES20.GL_TEXTURE2 GLES20.glBindTexture GLES20.GL_TEXTURE_2D muTextureName before call to any glTexImage2D...

Modifying camera output using SurfaceTexture and OpenGL

http://stackoverflow.com/questions/12519235/modifying-camera-output-using-surfacetexture-and-opengl

int texture new int 1 GLES20.glGenTextures 1 texture 0 GLES20.glBindTexture GLES11Ext.GL_TEXTURE_EXTERNAL_OES texture 0 GLES20.glTexParameterf.. mProgram GLES20.glActiveTexture GLES20.GL_TEXTURE0 GLES20.glBindTexture GLES11Ext.GL_TEXTURE_EXTERNAL_OES texture mPositionHandle GLES20.glGetAttribLocation.. etc. Put it in some init function. public void draw GLES20.glBindTexture GLES11Ext.GL_TEXTURE_EXTERNAL_OES texture GLES20.glDrawElements..

Android Camera will not work. startPreview fails

http://stackoverflow.com/questions/7942378/android-camera-will-not-work-startpreview-fails

gvTexCoordHandle GLES20.glActiveTexture GLES20.GL_TEXTURE0 GLES20.glBindTexture GLES20.GL_TEXTURE_2D camera_texture 0 GLES20.glUniform1i gvSamplerHandle.. 1 camera_texture 0 int tex camera_texture 0 GLES20.glBindTexture GL10.GL_TEXTURE_2D tex GLES20.glTexImage2D GL10.GL_TEXTURE_2D..

Framebuffer FBO render to texture is very slow, using OpenGL ES 2.0 on Android, why?

http://stackoverflow.com/questions/10729352/framebuffer-fbo-render-to-texture-is-very-slow-using-opengl-es-2-0-on-android

1 depthRb offset Create a texture to hold the frame buffer GLES20.glGenTextures 1 renderTex offset GLES20.glBindTexture GLES20.GL_TEXTURE_2D renderTex offset GLES20.glTexImage2D GLES20.GL_TEXTURE_2D 0 GLES20.GL_RGBA screenWidth screenHeight.. Not sure if is correct. I keep the texture and framebuffer ids to switch to them when I need. My drawing code GLES20.glBindTexture GLES20.GL_TEXTURE_2D textureId ShaderProgram program glgame.getProgram put vertices in the floatbuffer mTriangleVertices.put..

YUV to RGB conversion by fragment shader

http://stackoverflow.com/questions/12130790/yuv-to-rgb-conversion-by-fragment-shader

or may be use some other shader There are 3 textures make sure you do GLES20.glActiveTexture GLES20.GL_TEXTURE2 GLES20.glBindTexture GLES20.GL_TEXTURE_2D muTextureName before call to any glTexImage2D. and glTexSubImage2D You can also use glTexSubImage2D..

Modifying camera output using SurfaceTexture and OpenGL

http://stackoverflow.com/questions/12519235/modifying-camera-output-using-surfacetexture-and-opengl

shader return shader static private int createTexture int texture new int 1 GLES20.glGenTextures 1 texture 0 GLES20.glBindTexture GLES11Ext.GL_TEXTURE_EXTERNAL_OES texture 0 GLES20.glTexParameterf GLES11Ext.GL_TEXTURE_EXTERNAL_OES GL10.GL_TEXTURE_MIN_FILTER.. mProgram public void draw GLES20.glUseProgram mProgram GLES20.glActiveTexture GLES20.GL_TEXTURE0 GLES20.glBindTexture GLES11Ext.GL_TEXTURE_EXTERNAL_OES texture mPositionHandle GLES20.glGetAttribLocation mProgram position GLES20.glEnableVertexAttribArray.. initialization stuff from DirectVideo draw.glVertexAttribPointer etc. Put it in some init function. public void draw GLES20.glBindTexture GLES11Ext.GL_TEXTURE_EXTERNAL_OES texture GLES20.glDrawElements GLES20.GL_TRIANGLES drawOrder.length GLES20.GL_UNSIGNED_SHORT..

Android Camera will not work. startPreview fails

http://stackoverflow.com/questions/7942378/android-camera-will-not-work-startpreview-fails

maPositionHandle GLES20.glEnableVertexAttribArray gvTexCoordHandle GLES20.glActiveTexture GLES20.GL_TEXTURE0 GLES20.glBindTexture GLES20.GL_TEXTURE_2D camera_texture 0 GLES20.glUniform1i gvSamplerHandle 0 Draw the triangle GLES20.glDrawArrays GLES20.GL_TRIANGLE_STRIP.. 1 else GLES20.glDeleteTextures 1 camera_texture 0 GLES20.glGenTextures 1 camera_texture 0 int tex camera_texture 0 GLES20.glBindTexture GL10.GL_TEXTURE_2D tex GLES20.glTexImage2D GL10.GL_TEXTURE_2D 0 GL10.GL_RGB 256 256 0 GL10.GL_RGB GL10.GL_UNSIGNED_BYTE..