我想在QPainter的原生绘画区域之间获得默认的FBO。如:
void QGraphicsScene::drawBackground(QPainter *painter, const QRectF &rect)
{
painter->beginNativePainting();
unsign int defaultFBO = getDefaultFBO(); // how ?
glBindFramebuffer(GL_FRAMEBUFFER, defaultFBO );
glClearColor(1, 0, 0, 1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glBindFramebuffer(GL_FRAMEBUFFER, defaultFBO );
painter->endNativePainting();
}
有人可以帮我吗?