[Qt-interest] View JPEG in QGLWidget
Constantin Makshin
cmakshin at gmail.com
Tue Aug 2 13:00:04 CEST 2011
Because glDrawPixels() simply copes pixels from the image to the OpenGL framebuffer, ignoring any transformations and other similar stuff. I.e. in the best case its behavior is somewhat equivalent to memcpy().
On Tuesday, August 02, 2011 02:34:10 PM Brilliantov Kirill Vladimirovich wrote:
> >
> > OK, I think I've found the source of the problem ? incorrect vertex coordinates. In 3D graphics view-space both X and Y coordinates lie in the [-1, 1] range, not [0, width] [0, height] (these are ranges for screen-space coordinates).
> >
> > The attached tarball contains fixed version of the code. I also removed most debugging stuff and other unneeded things to make the code cleaner and easier to read.
>
> Thank you Constantin!
> Why work glDrawPixels with incorrect coordinat and why glDrawPixels work
> as static image?
> Thank you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110802/9e4c067e/attachment.bin
More information about the Qt-interest-old
mailing list