Hi,
Do it on a buffer, not directly to the display. Take a look at Qt OpenGL examples that use buffers. You can render the image into the buffer and then grab it to a QImage.
If you want to display the image using all the space of the viewport you will have to tell openGL the magnification and minimization filters:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
To copy to clipboard, switch view to plain text mode
This code defines the magnification and minimization filters that will be applied to the image to full display.
Bookmarks