-
Notifications
You must be signed in to change notification settings - Fork 78
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
6.7 with "DEFINES += QNANO_USE_RHI" still links and includes OpenGL #76
Comments
For Linux, during linkage, it links with
During compilation on Linux,
Also the windows-specific define Note that there are warnings in the code
|
FYI, this is my current version of include.pri -- even attempting to remove some of the references to OpenGL doesn't actually cause Qt (via QMake, not cmake in above output) to omit OpenGL references:
|
After a quick glimpse at the project code you can see that the QNANO_USE_RHI flag makes sure that the library is compatible with the RHI but only when the RHI has "OpenGL" as backend. This is, because nanovg heavily relies on OpenGL. For backend-independent RHI support the library must use functions as described in this example: https://doc-snapshots.qt.io/qt6-6.6/qtquick-scenegraph-rhiunderqml-example.html (which requires a lot of porting work). |
@demiantres That is false information. QNanoPainter now supports OpenGL, Vulkan, Metal, Direct3D11 and Direct3D12 with the RHI backend (see https://github.com/QUItCoding/qnanopainter/blob/master/libqnanopainter/nanovg/nanovg_rhi.cpp ). Steps:
Here are screenshots with few different backends: I have only tested the RHI backend on Windows & Android and haven't tried to remove linking to OpenGL libs. |
Thanks for the clarification. |
For example when linking, it is linking with
-lGLESv2
-lEGL
andlibQt6OpenGL_x86_64.so
.During compilation, it is including
QtOpenGL
and definingQNANO_QT_GL_INCLUDE
andQNANO_ENABLE_GLES3
.Also, I'm seeing a windows-specific define
-D_CRT_SECURE_NO_WARNINGS
( https://stackoverflow.com/questions/22450423/how-to-use-crt-secure-no-warnings ) for both Android and Linux compilation.The full compilation output is here:
qnanopainter-6.7-androidx86_64-compile.txt
The text was updated successfully, but these errors were encountered: