qtexture.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. /****************************************************************************
  2. **
  3. ** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
  4. ** Contact: https://www.qt.io/licensing/
  5. **
  6. ** This file is part of the Qt3D module of the Qt Toolkit.
  7. **
  8. ** $QT_BEGIN_LICENSE:LGPL$
  9. ** Commercial License Usage
  10. ** Licensees holding valid commercial Qt licenses may use this file in
  11. ** accordance with the commercial license agreement provided with the
  12. ** Software or, alternatively, in accordance with the terms contained in
  13. ** a written agreement between you and The Qt Company. For licensing terms
  14. ** and conditions see https://www.qt.io/terms-conditions. For further
  15. ** information use the contact form at https://www.qt.io/contact-us.
  16. **
  17. ** GNU Lesser General Public License Usage
  18. ** Alternatively, this file may be used under the terms of the GNU Lesser
  19. ** General Public License version 3 as published by the Free Software
  20. ** Foundation and appearing in the file LICENSE.LGPL3 included in the
  21. ** packaging of this file. Please review the following information to
  22. ** ensure the GNU Lesser General Public License version 3 requirements
  23. ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
  24. **
  25. ** GNU General Public License Usage
  26. ** Alternatively, this file may be used under the terms of the GNU
  27. ** General Public License version 2.0 or (at your option) the GNU General
  28. ** Public license version 3 or any later version approved by the KDE Free
  29. ** Qt Foundation. The licenses are as published by the Free Software
  30. ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
  31. ** included in the packaging of this file. Please review the following
  32. ** information to ensure the GNU General Public License requirements will
  33. ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
  34. ** https://www.gnu.org/licenses/gpl-3.0.html.
  35. **
  36. ** $QT_END_LICENSE$
  37. **
  38. ****************************************************************************/
  39. #ifndef QT3DRENDER_QTEXTURE_H
  40. #define QT3DRENDER_QTEXTURE_H
  41. #include <Qt3DRender/qtextureimagedata.h>
  42. #include <Qt3DRender/qtexturewrapmode.h>
  43. #include <Qt3DRender/qtextureimage.h>
  44. #include <Qt3DRender/qabstracttexture.h>
  45. QT_BEGIN_NAMESPACE
  46. #if 0
  47. // Create a forwarding header
  48. #pragma qt_class(QTexture)
  49. #pragma qt_sync_stop_processing
  50. #endif
  51. namespace Qt3DRender {
  52. class QT3DRENDERSHARED_EXPORT QTexture1D : public QAbstractTexture
  53. {
  54. Q_OBJECT
  55. public:
  56. explicit QTexture1D(Qt3DCore::QNode *parent = nullptr);
  57. ~QTexture1D();
  58. };
  59. class QT3DRENDERSHARED_EXPORT QTexture1DArray : public QAbstractTexture
  60. {
  61. Q_OBJECT
  62. public:
  63. explicit QTexture1DArray(Qt3DCore::QNode *parent = nullptr);
  64. ~QTexture1DArray();
  65. };
  66. class QT3DRENDERSHARED_EXPORT QTexture2D : public QAbstractTexture
  67. {
  68. Q_OBJECT
  69. public:
  70. explicit QTexture2D(Qt3DCore::QNode *parent = nullptr);
  71. ~QTexture2D();
  72. };
  73. class QT3DRENDERSHARED_EXPORT QTexture2DArray : public QAbstractTexture
  74. {
  75. Q_OBJECT
  76. public:
  77. explicit QTexture2DArray(Qt3DCore::QNode *parent = nullptr);
  78. ~QTexture2DArray();
  79. };
  80. class QT3DRENDERSHARED_EXPORT QTexture3D : public QAbstractTexture
  81. {
  82. Q_OBJECT
  83. public:
  84. explicit QTexture3D(Qt3DCore::QNode *parent = nullptr);
  85. ~QTexture3D();
  86. };
  87. class QT3DRENDERSHARED_EXPORT QTextureCubeMap : public QAbstractTexture
  88. {
  89. Q_OBJECT
  90. public:
  91. explicit QTextureCubeMap(Qt3DCore::QNode *parent = nullptr);
  92. ~QTextureCubeMap();
  93. };
  94. class QT3DRENDERSHARED_EXPORT QTextureCubeMapArray : public QAbstractTexture
  95. {
  96. Q_OBJECT
  97. public:
  98. explicit QTextureCubeMapArray(Qt3DCore::QNode *parent = nullptr);
  99. ~QTextureCubeMapArray();
  100. };
  101. class QT3DRENDERSHARED_EXPORT QTexture2DMultisample : public QAbstractTexture
  102. {
  103. Q_OBJECT
  104. public:
  105. explicit QTexture2DMultisample(Qt3DCore::QNode *parent = nullptr);
  106. ~QTexture2DMultisample();
  107. };
  108. class QT3DRENDERSHARED_EXPORT QTexture2DMultisampleArray : public QAbstractTexture
  109. {
  110. Q_OBJECT
  111. public:
  112. explicit QTexture2DMultisampleArray(Qt3DCore::QNode *parent = nullptr);
  113. ~QTexture2DMultisampleArray();
  114. };
  115. class QT3DRENDERSHARED_EXPORT QTextureRectangle : public QAbstractTexture
  116. {
  117. Q_OBJECT
  118. public:
  119. explicit QTextureRectangle(Qt3DCore::QNode *parent = nullptr);
  120. ~QTextureRectangle();
  121. };
  122. class QT3DRENDERSHARED_EXPORT QTextureBuffer : public QAbstractTexture
  123. {
  124. Q_OBJECT
  125. public:
  126. explicit QTextureBuffer(Qt3DCore::QNode *parent = nullptr);
  127. ~QTextureBuffer();
  128. };
  129. class QTextureLoaderPrivate;
  130. class QT3DRENDERSHARED_EXPORT QTextureLoader : public QAbstractTexture
  131. {
  132. Q_OBJECT
  133. Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
  134. public:
  135. explicit QTextureLoader(Qt3DCore::QNode *parent = nullptr);
  136. ~QTextureLoader();
  137. QUrl source() const;
  138. public Q_SLOTS:
  139. void setSource(const QUrl &source);
  140. Q_SIGNALS:
  141. void sourceChanged(const QUrl &source);
  142. private:
  143. Q_DECLARE_PRIVATE(QTextureLoader)
  144. };
  145. } // namespace Qt3DRender
  146. QT_END_NAMESPACE
  147. #endif // QT3DRENDER_QTEXTURE_H