qsgrendererinterface.sip 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. // qsgrendererinterface.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtQuick Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. class QSGRendererInterface /NoDefaultCtors/
  22. {
  23. %TypeHeaderCode
  24. #include <qsgrendererinterface.h>
  25. %End
  26. public:
  27. enum GraphicsApi
  28. {
  29. Unknown,
  30. Software,
  31. OpenGL,
  32. OpenVG,
  33. OpenGLRhi,
  34. Direct3D11Rhi,
  35. VulkanRhi,
  36. MetalRhi,
  37. NullRhi,
  38. Direct3D11,
  39. Vulkan,
  40. Metal,
  41. %If (Qt_6_6_0 -)
  42. Direct3D12,
  43. %End
  44. Null,
  45. };
  46. enum Resource
  47. {
  48. DeviceResource,
  49. CommandQueueResource,
  50. CommandListResource,
  51. PainterResource,
  52. RhiResource,
  53. PhysicalDeviceResource,
  54. OpenGLContextResource,
  55. DeviceContextResource,
  56. CommandEncoderResource,
  57. VulkanInstanceResource,
  58. RenderPassResource,
  59. RhiSwapchainResource,
  60. RhiRedirectCommandBuffer,
  61. RhiRedirectRenderTarget,
  62. %If (Qt_6_4_0 -)
  63. RedirectPaintDevice,
  64. %End
  65. %If (Qt_6_6_0 -)
  66. GraphicsQueueFamilyIndexResource,
  67. %End
  68. %If (Qt_6_6_0 -)
  69. GraphicsQueueIndexResource,
  70. %End
  71. };
  72. enum ShaderType
  73. {
  74. UnknownShadingLanguage,
  75. GLSL,
  76. HLSL,
  77. RhiShader,
  78. };
  79. enum ShaderCompilationType /BaseType=Flag/
  80. {
  81. RuntimeCompilation,
  82. OfflineCompilation,
  83. };
  84. typedef QFlags<QSGRendererInterface::ShaderCompilationType> ShaderCompilationTypes;
  85. enum ShaderSourceType /BaseType=Flag/
  86. {
  87. ShaderSourceString,
  88. ShaderSourceFile,
  89. ShaderByteCode,
  90. };
  91. typedef QFlags<QSGRendererInterface::ShaderSourceType> ShaderSourceTypes;
  92. virtual ~QSGRendererInterface();
  93. virtual QSGRendererInterface::GraphicsApi graphicsApi() const = 0;
  94. virtual void *getResource(QQuickWindow *window, QSGRendererInterface::Resource resource) const;
  95. virtual void *getResource(QQuickWindow *window, const char *resource) const;
  96. virtual QSGRendererInterface::ShaderType shaderType() const = 0;
  97. virtual QSGRendererInterface::ShaderCompilationTypes shaderCompilationType() const = 0;
  98. virtual QSGRendererInterface::ShaderSourceTypes shaderSourceType() const = 0;
  99. static bool isApiRhiBased(QSGRendererInterface::GraphicsApi api);
  100. enum RenderMode
  101. {
  102. RenderMode2D,
  103. RenderMode2DNoDepthBuffer,
  104. RenderMode3D,
  105. };
  106. };