Results 1 to 3 of 3

Thread: QGLWidget : unable to texture a quad

  1. #1
    Join Date
    Jan 2006
    Posts
    162
    Thanks
    9
    Qt products
    Qt3
    Platforms
    Windows

    Default QGLWidget : unable to texture a quad

    Hi everybody !

    I'm learning opengl since the beginning of this week and I have a problem (many problems in fact but I solved some of the others ) with texture.

    I saw many examples over the net using glut and other librairies but not Qt so I tried to port samples from glut to Qt with no success.

    As a result, I saw my quad but the texture is not mapped despite.

    Does someone just could tell me exactly what to to (in which functions) in order to map a texture (in a png file) onto a quad ?

    Thanks in advance.

  2. #2
    Join Date
    Jan 2006
    Posts
    162
    Thanks
    9
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: QGLWidget : unable to texture a quad

    An information that could be of importance, the image I wish to use as a texture has the following size :
    width = 140
    height = 200

    The format of the image is png.

    Hope that could help.

  3. #3
    Join Date
    Jan 2006
    Posts
    162
    Thanks
    9
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: QGLWidget : unable to texture a quad

    I have some news.

    The image used as a texture must have width and height power of 2 ... meaning 32, 64, 128, etc, ... power of 2.

    It is advise not to use images whose size is greather than 256.

    I have test many textures with images whose size are 512x512 and it works. Actually I can't use an image whose size are 3020x3020 ... logical because not power of 2.

    The problem is solved

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.