Add an initial rhi implementation that mimics the opengl implementation

This commit is contained in:
luisangelsm
2026-01-17 22:46:27 +01:00
parent 91b8a31727
commit 3381754c12
25 changed files with 2739 additions and 21 deletions

View File

@ -20,8 +20,18 @@ include (../dependencies/pdf_backend.pri)
INCLUDEPATH += ../common/gl
greaterThan(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 6) {
INCLUDEPATH += ../common/rhi
DEFINES += YACREADER_USE_RHI
}
win32 {
LIBS += -loleaut32 -lole32 -lshell32 -lopengl32 -luser32
LIBS += -loleaut32 -lole32 -lshell32 -luser32
# When using RHI (Qt 6.7+), don't link OpenGL directly - QRhiWidget handles graphics APIs
message("RHI mode: not linking opengl32 (using QRhiWidget)")
greaterThan(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 6) {
} else {
LIBS += -lopengl32
}
msvc {
QMAKE_CXXFLAGS_RELEASE += /MP /Ob2 /Oi /Ot /GT /GL
@ -51,6 +61,10 @@ QT += sql network widgets svg quickcontrols2
greaterThan(QT_MAJOR_VERSION, 5): QT += openglwidgets core5compat
greaterThan(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 6) {
QT += gui-private
}
# Input
HEADERS += comic_flow.h \
../common/concurrent_queue.h \
@ -140,6 +154,10 @@ HEADERS += comic_flow.h \
!CONFIG(no_opengl) {
HEADERS += ../common/gl/yacreader_flow_gl.h
greaterThan(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 6) {
HEADERS += ../common/rhi/yacreader_flow_rhi.h
}
}
SOURCES += comic_flow.cpp \
@ -228,6 +246,11 @@ SOURCES += comic_flow.cpp \
!CONFIG(no_opengl) {
SOURCES += ../common/gl/yacreader_flow_gl.cpp
greaterThan(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 6) {
SOURCES += ../common/rhi/yacreader_flow_rhi.cpp
RESOURCES += ../common/rhi/shaders/shaders.qrc
}
}
macx {