Connecting GLFW to QOpenGLWidget - c++

I'm trying to connect GLFW application to Qt QOpenGLWidget, but I can't figure out is it possible and if it's possible, how to do this?

Maybe it's a bit late for an answer, anyway:
GLFW is a library provides an API for creating windows, contexts and surfaces, receiving input and events. Qt already does it for you. (with additional GL functions)
So it is not possible to use Qt with GLFW. Almost everything that GLFW provides could be found inside Qt libraries. For example: to specify major/minor version you can use QSurfaceFormat, etc.
I think it's worth to mention that Qt works with other OpenGL bindings.
I use PyOpenGL with Qt with no problems instead built-in Qt functions. Works perfectly.

Related

Render QtQuick into a texture of an external OpenGL application

We have an application that loads OpenGL functions via GLEW and WGL.
We aim to use QML created UI on top of it within the same window.
We had a look into the QQuickRenderControl but we are not sure how to link the OpenGL context to Qt and if the loaded OpenGL function pointers are compatible with the one used by Qt.
We have already looked into the RenderControl example but the difference here is that the OpenGL context and loading are managed by Qt. We want to manage it on our own without Qt dependencies.
We use Qt 5.11.
edit: Both our OpenGL and Qt are in the same process. Just to not confuse you.

Is there a built-in OpenGL GUI windowing library in XCode 6 (OS X 10.10)?

I am trying to develop a C++ application that uses OpenGL. I set up everything in XCode 6.4 (running on OS X 10.10.5) and I was able to get the OpenGL framework working. However, I can't figure out how to draw the graphics to a GUI window.
I know that GLUT is available, but it is deprecated and I'd rather avoid using it. Instead, is there a way of using some of Apple's native windowing systems (I assume there should be something available in the Cocoa API)?
I would rather avoid downloading additional libraries like SDL or Qt since I do not have root access on this machine and maintaining third-party libraries those may be challenging.

Qt C++ Library for Windows and OpenGL

I am trying to experiment with the Qt library on Windows. On their downloads page, I notice that the binaries built using VS2012 are available in two forms, with and without OpenGL. What exactly is the difference between the two? In the OpenGL version, do they have some special API implemented using OpenGL or does all of Qt rendering depend on OpenGL? Also, is there a version of Qt that uses DirectX?
#Raman: The opengl variant is using the desktop opengl version just like with Qt4.
The non-opengl variant is using angle, and you need to have that installed alongside the DirectX SDK to get it working. Angle is an adapter between the directx and the opengles API. Only the latter is support directly by Qt, but unfortunately directx drivers tend to work better on Windows than the opengl(es) ones. There are no plans to support a directx backend inside Qt, so we leave with Google's Angle work in that regard.
As for providing some extra bit, there was a discussion about it recently on the mailing list, that this decision should not be build time, but more like run time. However, no one has stood up just yet to make that work. Hopefully, that will change soon. It is causing confusion for the end users just like, so do not feel alone. ;-)
Hope this explanation helps.
DirectX is supported via the ANGLE based library.
Note that this has changed and as of Qt 5.5 the prebuilt binaries you can download from the Qt website are configured with the -opengl dynamic option. This is what #lpapp above was talking about. Qt defaults to choosing either native OpenGL drivers or ANGLE at run time now.
Qt internally uses OpenGL to render unless you specify otherwise now. You can also render custom OpenGL content using Qt's QOpenGLxxx functions and classes.
For a simple introduction to Qt and OpenGL that covers this and more click here.

Qt 4.x/5.x and OpenGL for Desktop Gui application: What module to choose?

I am starting a new GUI application project using Qt and OpenGL for Linux/Windows desktops. My assumptions so far: use Qt GUI (C++ ... not QML/QtQuick 2) with OpenGL 4.1 or higher (requirement). After some reading, I am completely lost about what path to choose. What path will keep my application future-proof in term of support and libraries.
Qt 4.x or Qt 5.x?
Standard OpenGL or QGL or QOpenGL or QtOpenGL wrappers?
QWidget/QGLWidget (Qt 4.x) or QWindow (Qt 5.x)?
The application is intended to run in desktop environment and will do a lot of file (geometry) opening/saving, instanced 3D painting and some imaging. Could someone point me out to the best combination to choose with some explanation if possible?
Sean Harmer presentation on Qt 5 and OpenGL did answer some parts of my questions but I was a bit lost when he started using QML and QtQuick 2. I felt like QOpenGL was a lightweighted version to be used with QtQuick 2. Correct me If I am wrong on that please.
Qt 5.0 is still in beta, therefore if your project is serious, you should go with qt 4.8, because that is the latest stable release. However, if you must have some Qt 5.0 features, then you have no other choice but to go with 5.0.
Since you chosen Qt, you should stick to it. That means using QtOpenGL. That doesn't mean you are not going to use standard OpenGL. QtOpenGL provides you API to simplify some OpenGL calls, and make them more object oriented. After all, OpenGL is set of C functions, not set of c++ classes.

Looking for Linux/Windows -deployable OpenGL windowing-and-OS libraries

I'd like to set up an OpenGL development environment in Linux that I can also cross-compile for Windows out of. It looks like GLFW + OpenGL will give me what I need.
I tried installing the GLFW development package for Ubuntu 8.10, but I had dependency problems. I may stick with it, though.
Has anyone used GLFW for Linux? Has anyone tried cross-compiling for Windows? Is there another solution to handle windowing with OpenGL that might be better?
I second SDL. I also suggest GLee or GLEW for extension managing as well
I would try SDL, it is very easy to use. For cross compilation, I would use MinGW or Cygwin.
I would recommend looking at using Qt and OpenGL together for your windowing needs. As of 4.5, Qt is now LGPL, and supports Linux, Windows, and Mac out of the box.