2

と でテクスチャを生成しようとしていQImageますQOpenGLTextureQImageカラーフォーマットを にRGBA8888、カラーを に設定しましたsetPixelが、アルファ値をいくら変更しても 255 のままで、画像の透明度は変わらないようです。

これが私のコードです:

QImage texPic(width, height, QImage::Format_RGBA8888);
texPic.setPixel(0, 0, qRgba(255,0,0,0));
texPic.setPixel(0, 1, qRgba(0,255,0,100));
QOpenGLTexture *texture = new QOpenGLTexture(texPic);

助言がありますか?

4

1 に答える 1