Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/184.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
有没有Android蜂窝SurfaceTexture类的经验?_Android_Opengl Es_Textures_Android 3.0 Honeycomb - Fatal编程技术网

有没有Android蜂窝SurfaceTexture类的经验?

有没有Android蜂窝SurfaceTexture类的经验?,android,opengl-es,textures,android-3.0-honeycomb,Android,Opengl Es,Textures,Android 3.0 Honeycomb,我想实现一个简单的演示示例,将摄影机提要作为纹理流传输到opengl es对象。使用此SurfaceTexture类似乎可以做到这一点。 有人能告诉我从哪里开始的正确方向吗? 或者有人能解释一下如何使用这个类吗 现在我正在做一些类似的事情: int[] textures = new int[1]; gl.glGenTextures(1, textures, 0); mTextureId = textures[0]; gl.glBindTexture(GL10.GL_TEXTURE_2D, mT

我想实现一个简单的演示示例,将摄影机提要作为纹理流传输到opengl es对象。使用此SurfaceTexture类似乎可以做到这一点。 有人能告诉我从哪里开始的正确方向吗? 或者有人能解释一下如何使用这个类吗

现在我正在做一些类似的事情:

int[] textures = new int[1];
gl.glGenTextures(1, textures, 0);
mTextureId = textures[0];

gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureId);

gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);

gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER,
                GL10.GL_LINEAR);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER,
                GL10.GL_LINEAR);

gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
                GL10.GL_CLAMP_TO_EDGE);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,
                GL10.GL_REPEAT);

mSurfaceTexture = new SurfaceTexture(mTextureId);
最初,您将使用
gl.glTexImage2D()
为该纹理提供一个图像,但因为没有来自SurfaceTexture对象的位图/图像来提供它,这有点令人困惑