我正在尝试在画布上写一个文本并设置为GL10对象纹理,如下所示:
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_4444);
bitmap.eraseColor(0);
Canvas canvas = new Canvas(bitmap);
canvas.translate(width, height);
canvas.drawColor(Color.WHITE);
Paint paint = new Paint();
paint.setStyle(Paint.Style.FILL);
paint.setColor(0xffffffff & Color.MAGENTA);
paint.setAlpha(255);
canvas.drawText("Hello world", 0, 30, paint);
如果我改变但是文本不是apears,则绘制纹理颜色。 有人知道为什么吗?