How is JVitela’s method passed to a vertex or fragment shader?
它像任何其他纹理一样传递:
>创建纹理
>设置过滤和包装
>通过GLUtils.texImage2D上传数据(GLES20.GL_TEXTURE_2D,0,位图,0);
Is the section about the background necessary, or will leaving the background out result in just the text over the rest of the GL Surface?
没有必要(只有一个背景),留下它会写出黑色像素(因为代码之前用黑色擦除了位图像素.如果你只想绘制文本,你需要启用混合或使用一个特殊的着色器,它知道文本的颜色.
What exactly is the textures variable he used?
I think it’s a texture data handle (comparing his bind() to at that of learnopengles) but why an array? is it shared with other textures?
这样,可以使用glGenTextures创建多个纹理句柄.