Macros in QRhi shaders?
-
Hi,
I need different code paths in a shader, for example:
#ifdef QSHADER_GLSL layout(location = 0) in vec2 a_pos; #else layout(location = 0) in ivec2 a_pos_int; #endif
I know that it is possible to manually define defines:
qt6_add_shaders(my_target DEFINES "QSHADER_GLSL=true" FILES ... )
But this way using
qputenv("QSG_RHI_BACKEND", "opengl")
does not work. Is there an alternative? -