Results 1 to 2 of 2

Thread: help on openGL context

  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Question help on openGL context

    Hi, I've got a problem. In some case my app update the openGL context calling initalizeGL;
    that's ok; but I see that in this case, the light seems fall down; my background white lines appear more dark; I see that I increment y value of light position up to 4 or 5, the lines appear more white (I think this ok), and when openGL context is update, the light don't fall down; Any hints?
    Qt Code:
    1. //initializeGL()
    2. GLfloat light_position[] = {0.0, 0.0, 2.0, 0.0};
    3. glLightfv(GL_LIGHT0, GL_POSITION, light_position);
    4. glEnable(GL_LIGHTING);
    5. glEnable(GL_LIGHT0);
    6. glEnable(GL_NORMALIZE);
    To copy to clipboard, switch view to plain text mode 
    Regards

  2. #2
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: help on openGL context [solved]

    Sorry I thought was a context problem; the light position is affect by MODELVIEW trasformation and some glTraslate changed the light position; Thanks
    Regards

Similar Threads

  1. OpenGL and Qt Question
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 18th April 2009, 18:04
  2. context of opengl is changing on mac os x
    By Sandip in forum Qt Programming
    Replies: 1
    Last Post: 4th April 2008, 12:25
  3. Qtopia Core & OpenGL ES?
    By zelko in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 28th May 2007, 07:21
  4. Qt's optimized OpenGL context switching
    By sverhoff in forum Qt Programming
    Replies: 0
    Last Post: 28th March 2006, 16:40
  5. Context OpenGL
    By mickey in forum Qt Programming
    Replies: 4
    Last Post: 3rd March 2006, 21:13

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.