Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting of default fbo id #3

Open
wants to merge 42 commits into
base: master
Choose a base branch
from

Conversation

rooswouter
Copy link

Added setting of default fbo id to solve problem with rendering to texture. See http://forum.osgearth.org/solved-black-screen-with-drape-mode-in-a-QOpenGLWidget-td7592420.html#a7592421

mathieu and others added 30 commits October 12, 2016 16:59
Support side-by-side installation of Qt4 and Qt5 builds
Use include/osgQt also for osgQt5
Sometimes, the window resized when _gw hasn't been created.
Fix bug when compiling the doc
fix the bug which _gw pointer is null.
If I hadn't call makeCurrent function before swapBuffers by using ThreadingModel::CullThreadPerCameraDrawThreadPerContext with Qt5.9, I will get this warning: qopenglcontext::swapbuffers() called without corresponding makecurrent().
This compiles but doesn't have an exmaple yet
We use this in production for our software
originale code is here https://github.com/mkrus/osgQt5Samples
fix bug: without corresponding makecurrent()
Modify FIND_PACKAGE Qt5 components
Added missing Camera::setDrawBuffer()/setReadBuffer()
Fix build with Qt 5.11_beta3 (dropping qt5_use_modules)
 Compatible with the new and old versions of OSG
mathieu and others added 12 commits September 19, 2018 18:40
* Removed definition of __gl_h_ to prevent the Gl.h include not defining standard
Gl defines such as GLfloat when compiling on Windows systems (Visual Studio 2013 tested)
* Removed setting of state settings specific to OpenGL 3 non fixed pipeline.
* Added check for starting without any arguments to call constructor without arguments
* Add setting of default fbo id to fix problem with render to texture in the QOpenGLWidget
"When implementing a new widget, it is almost always useful to reimplement sizeHint() to provide a reasonable default size for the widget and to set the correct size policy with setSizePolicy()."   
https://doc.qt.io/qt-5/qwidget.html#size-hints-and-size-policies  

Default value of QWidget::rect is 0,0,640,480. This SD aspect ratio agrees with OSG when widget is shown by itself. However, once widget is put into a layout it has to return a valid sizeHint in order to preserve this aspect ratio and size.
override sizeHint in osgQOpenGLWidget
Check the validation of `_mainwindow` when invoke `_mainwindow->setCentralWidget(this)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.