I'm trying to generate a texture with
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);
I've found the problem, it's not from the setting of texture itself. It because I didn't get the gl functions setting right. I added
And now it worked.