Results 1 to 2 of 2

Thread: Access VAO across library boundaries via sharing QGLWidget contexts?

  1. #1
    Join Date
    Mar 2011
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Access VAO across library boundaries via sharing QGLWidget contexts?

    Hi,

    I have a CAD-like Qt-based application that dynamically loads it's viewports from external libraries built using Qt's plugin architecture. The viewports can share data by sharing QGLWidgets as contexts (in a hierarchy) that contain various 'levels' of state and data:

    • A globally accessible shader context, this holds a context that is invisible and never rendered to, but allows shaders to be compiled.

    • A document accessible model context that holds the per project geometry data for sharing across viewports, again invisible and never rendered to.

    • Finally, a viewport context that actually does the rendering from which camera the viewport represents.

    When I run the application, the plugin loads without error, but the resulting viewports throw a GL_INVALID_OPERATION error when I try to glBindVertexArray() for drawing my viewport grid. This all worked before I migrated my default viewport into a separate dynamic library!

    My viewport plugin uses a QGLWidget context that is created in a different library, when I try to bind a vertex array object (built in the same library) whilst that context is active but called from my plugin library, OpenGL does not recognise the address.

    My computer science knowledge isn't great, so in short - can I access/call OpenGL objects from external dynamically loaded libraries?

    Thanks

  2. #2
    Join Date
    Mar 2011
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Access VAO across library boundaries via sharing QGLWidget contexts?

    Discovered (embarassingly) that is wasn't the problem at all, and it was just me being dim. Please delete this thread moderators!

Similar Threads

  1. Strategy for offscreen and onscreen gl contexts
    By mckinnon in forum Qt Programming
    Replies: 0
    Last Post: 22nd December 2010, 02:01
  2. Replies: 4
    Last Post: 17th October 2009, 22:31
  3. qobject_cast fails across dynamic library boundaries
    By JPNaude in forum Qt Programming
    Replies: 9
    Last Post: 30th December 2008, 17:36
  4. QGLWidget, QPainter and shared contexts
    By bamboo in forum Qt Programming
    Replies: 7
    Last Post: 17th April 2007, 18:11
  5. QWidgte::move(int x, int y) beyond the screen boundaries
    By momesana in forum Qt Programming
    Replies: 7
    Last Post: 20th February 2007, 10:12

Tags for this Thread

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.