Results 1 to 15 of 15

Thread: old problem with QGLContext and render pixmap

Threaded View

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

    Default old problem with QGLContext and render pixmap

    hi, I have an old problem with render pixmap; after gen pixmap called, my textures are destroyed and I can't understand why.
    Qt Code:
    1. //inside a member of mainForm class
    2. qp = myWidget1->renderPixmap(800, 600, FALSE);
    3. qi=qp.convertToImage();
    4. qi = qi.smoothScale(500,500);
    5. qi.save(base_file+".png","PNG");
    To copy to clipboard, switch view to plain text mode 
    I know render pixmap do this: create a new contextGL call initializeGL(), resizeGL() an PaintGL(); after, it restore the previous context; but the previuos context is broken..also pixmap doesn't appear realistic: some textures are broken; but the texture broken on the final image image.jpg) and image on widgetGL aren't the same...
    I tried to do:
    Qt Code:
    1. myWidget1->initializeGL();
    2. myWidget1->resizeGL(myWidget1->width(), myWidget1->height());
    3. myWidget1->paintGL();
    To copy to clipboard, switch view to plain text mode 
    I thought this can see to me if some error in contextGL; but these 3 instrucion don't change the image in QGLWIdget....
    After this, if I put a new texture on my image (ie on one object, so that call every gl function that initialize texttures), the prevoius context is restored and every textures are in the right place)
    Help me, please; thanks
    Last edited by mickey; 14th July 2006 at 00:24.
    Regards

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.