Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Exception at creation of QOpenGLFramebufferObject
Qt 6.11 is out! See what's new in the release blog

Exception at creation of QOpenGLFramebufferObject

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 701 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.
  • L Offline
    L Offline
    luckydevil
    wrote on last edited by
    #1

    Hello. Very possible my question is unique.
    Consider the simplest program, writteln with Qt5.1 and MSVC 2012
    @
    #include <QtCore>
    #include <QtGui>
    #include <QtWidgets>
    #include <QOpenGLFramebufferObject>
    #include <QtWidgets/QApplication>
    void foo()
    {
    QOpenGLFramebufferObject fbo(512,512);// exception here
    }

    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    foo();
    FastGL w;//GastGL is a simply widget, generated automatically, void
    w.show();
    return a.exec();
    }@

    Actually, firstly I got the example from "here":http://dangelog.wordpress.com/2013/02/10/using-fbos-instead-of-pbuffers-in-qt-5-2/ but then simplify it. I have exception while creating QOpenGLFramebufferObject object:
    bq. Unhandled exception at 0x0F551DFA (Qt5Guid.dll) in FastGL.exe: 0xC0000005: Access violation reading location 0x00000004.
    I also tried to pass format to constructor, chage the size, but without an effect.
    When working in MSVC2010 with Qt 4.8.4 but using QGLFramebufferObject it still doesn't work.
    The code:
    @DoubleBuff::DoubleBuff(QWidget *parent, Qt::WFlags flags)
    : QMainWindow(parent, flags)//DoubleBuff is a widget being created in main
    {
    ui.setupUi(this);
    m_painter=new QPainter(this);
    m_fbo=new QGLFramebufferObject(1024,1024);
    }@
    Exception in qscopedpointer.h, line 110,
    @ inline T *operator->() const
    {
    Q_ASSERT(d);
    return d;
    }@

    Any thinks?
    Actually, my task is to draw sequence of rectangles having different colors on form as soon as possible, about 60 frames/sec. Can you give me an advice how to do this?

    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