[Qt-interest] Rendering 2D images using QGLWidget..
Sean Harmer
sean.harmer at maps-technology.com
Mon Feb 23 19:42:39 CET 2009
On Monday 23 February 2009 17:56:26 Keshava Krishna wrote:
> Hi,
>
> 'm building an application where in i can rotate an image in x, y and z
> directions...
> is there any way to open an 2D image using QGLWidget?
> i saw a function called bindTexture, will it be of any help?
Take a look at the docs for QImage QGLWidget::convertToGLFormat ( const
QImage& img ). Just use QImage to load your image and then convert it to
OpenGL format so that you can bind it to a texture. Draw a textured quad and
apply whatever transformation matrix you like to rotate the quad.
HTH,
Sean
More information about the Qt-interest-old
mailing list