Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. How can I call PaintGL method

How can I call PaintGL method

Scheduled Pinned Locked Moved Game Development
4 Posts 2 Posters 1.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sunil.nair
    wrote on last edited by
    #1

    The paintGL method is called automatically when a number of events occur, eg window resizing etc.
    Is there any way to explicitly call the paintgl method in QT?
    @void CubeView::update()
    {
    QMatrix4x4 world;
    double posx=drawcursor();
    world.translate(posx,0,0);
    cube->setLocalTransform(world);
    std::cout<<"hi\n";
    QGLPainter paint;
    paintGL(&paint);
    }@

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Just call the base class update() function

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sunil.nair
        wrote on last edited by
        #3

        Thank you for your reply. I am sorry to post this on two forums. However, I am using the QGLView class and it does not seem to contain the update function.
        Does it have an update function?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Since the question is getting one the same road as "this":http://qt-project.org/forums/viewthread/49967/ one, let's stop here and only use one thread.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved