Results 1 to 2 of 2

Thread: Qt ARGB and RGBA

  1. #1
    Join Date
    Feb 2009

    Default Qt ARGB and RGBA


    I want to know why Qt uses a ARGB model, and not the RGBA to store images..

    I mean when qt want to send data to openGL they have to use the RGBA model.
    So that is an unnecessary step.

  2. #2
    Join Date
    Jan 2006
    Thanked 52 Times in 52 Posts
    MacOS X Unix/X11

    Default Re: Qt ARGB and RGBA

    QImage can store an arbitrary number of formats and so can OpenGL. Use for example GL_ABGR_EXT to upload a texture in ABGR-mode. OpenGL is one of the many things that Qt can address but Qt was not written with the sole purpose of utilizing OpenGL. There is for sure a reason to do it this way and not the other way around.

    If you use GLuint QGLWidget::bindTexture ( const QImage & image, GLenum target = GL_TEXTURE_2D, GLint format = GL_RGBA ), you give Qt the chance to optimize uploads of textures. Maybe there is no unnecessary step in this case.
    It's nice to be important but it's more important to be nice.

Similar Threads

  1. Save tiff as RGB and not ARGB
    By skyperhh in forum Qt Programming
    Replies: 0
    Last Post: 3rd December 2009, 13:33
  2. About Qt Labs' Dojo ARGB demo
    By naruto_9w in forum Qt Programming
    Replies: 2
    Last Post: 14th January 2009, 11:30
  3. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  4. argb windows and blur
    By kernel_panic in forum Qt Programming
    Replies: 6
    Last Post: 13th August 2007, 16:52
  5. ARGB windows on Windows?
    By ber_44 in forum Qt Programming
    Replies: 18
    Last Post: 11th August 2007, 12:35


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.