12/03/26 23:19:21.72
>>876
表示のビットマップからテクスチャ生成するソースでこういうのを見たので
public Texture makeTexture(Bitmap bitmap) {
…
//画像データの生成
ByteBuffer bb=ByteBuffer.allocateDirect(size*size*4);
bb.order(ByteOrder.BIG_ENDIAN);
IntBuffer ib=bb.asIntBuffer();
for (int y=result.getHeight()-1;y>-1;y--) {
for (int x=0;x<result.getWidth();x++) {
int pix=result.getPixel(x,result.getHeight()-y-1);
int alpha=((pix>>24)&0xFF);
int red =((pix>>16)&0xFF);
int green=((pix>>8)&0xFF);
int blue =((pix)&0xFF);
ib.put((red<<24)+(green<<16)+(blue<<8)+alpha);
}
}
…
>>878
テクスチャそのものに直接描画できるわけですか。