Results 1 to 10 of 10

Thread: OpenGL Texture Loading Problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Jun 2011
    Posts
    203
    Thanks
    7
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: OpenGL Texture Loading Problem

    Yep, that's pretty much all the code I've got so far... I'm just following along with NeHe's tutorial and a Qt version of it that I found elsewhere. Hmm... I'll have to look over what I might have missed in that case. What do you mean by model and view matrix definition? I've provided the 2D quad that I want to map the texture to, isn't that the model?

    P.S. After reviewing NeHe's tutorial again, I'm still failing to see what I might have missed.

    I also made sure the image was a power of 2 dimension... not necessary I know but just in case.

    Finally I read about the image formats... and according to what I read:

    Qt Code:
    1. glTexImage2D(GL_TEXTURE_2D, 0, 3, GLFormatImage.width(), GLFormatImage.height(), 0, GL_RGB, GL_UNSIGNED_BYTE, GLFormatImage.bits());
    To copy to clipboard, switch view to plain text mode 

    should be right... it's 24 bit which I assume to be per pixel and that also suggests to me at least that it's RGB and not RGBA... although in the attributes it does have A, but I couldn't find out what that meant.
    Last edited by Atomic_Sheep; 22nd May 2012 at 13:09.

Similar Threads

  1. openGL bindtexture from within thread not working
    By thinkabit in forum Qt Programming
    Replies: 0
    Last Post: 23rd April 2011, 12:13
  2. Replies: 1
    Last Post: 4th February 2011, 03:34
  3. Replies: 0
    Last Post: 6th December 2009, 00:41
  4. Qt with OpenGL ES for ARM9 - All OpenGL ES tests have failed!
    By vinpa in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 3rd December 2009, 10:10
  5. aux functions not working on opengl
    By john_god in forum Qt Programming
    Replies: 7
    Last Post: 11th April 2009, 12:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.