Hi all,

I'm using Qt 5 on WInXP 32 bit.
I'm rendering bitmap image in the window.
The problem is that the quality of the picture is poor. I have made the program using WInAPI and OpenGL and the picture looks like original.
It seems that the resolution of the picture is low.
I have tryied to change the QSurfaceFormat. The strange thing when i get it from the QWindow the Red/Green/Blue buffer sizes are set to -1.
I have changed the surface format like the following:
Qt Code:
  1. m_context = new QOpenGLContext(this);
  2. QSurfaceFormat format = requestedFormat();
  3. format.setBlueBufferSize(8);
  4. format.setRedBufferSize(8);
  5. format.setGreenBufferSize(8);
  6. format.setAlphaBufferSize(8);
  7. format.setDepthBufferSize(8);
  8. format.setRenderableType(QSurfaceFormat::OpenGL);
  9. format.setSamples(16);
  10.  
  11. setFormat(format);
  12. m_context->setFormat(format);
To copy to clipboard, switch view to plain text mode 

The quality is still low.
Here is the screenshot.

bmp_opengl_problem.jpg

The upper is rendered using QT engine the lower is from my WinAPI application.
I can't exactly understand why the upper image looks poor? Is that color or resolution problem?
It seems to me that the pixel sizes on the upper image are bigger.