android opengl es 2.0教程,Android OpenGL ES 2.0文本渲染

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创建多个纹理句柄.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值