summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/qt3d/deferred-renderer-cpp/gbuffer.cpp8
-rw-r--r--examples/qt3d/deferred-renderer-qml/GBuffer.qml8
-rw-r--r--examples/qt3d/planets-qml/PlanetFrameGraph.qml2
-rw-r--r--examples/qt3d/shadow-map-qml/ShadowMapFrameGraph.qml2
-rw-r--r--src/render/backend/attachmentpack.cpp2
-rw-r--r--src/render/backend/renderview.cpp2
-rw-r--r--src/render/frontend/qrendertargetoutput.cpp2
-rw-r--r--src/render/frontend/qrendertargetoutput.h38
-rw-r--r--src/render/graphicshelpers/graphicscontext.cpp6
-rw-r--r--src/render/graphicshelpers/graphicshelperes2.cpp6
-rw-r--r--src/render/graphicshelpers/graphicshelpergl2.cpp6
-rw-r--r--src/render/graphicshelpers/graphicshelpergl3.cpp6
-rw-r--r--src/render/graphicshelpers/graphicshelpergl3_3.cpp6
-rw-r--r--src/render/graphicshelpers/graphicshelpergl4.cpp6
-rw-r--r--tests/auto/render/qrendertargetselector/tst_qrendertargetselector.cpp4
15 files changed, 52 insertions, 52 deletions
diff --git a/examples/qt3d/deferred-renderer-cpp/gbuffer.cpp b/examples/qt3d/deferred-renderer-cpp/gbuffer.cpp
index 0c05bfa4f..c9607fdc2 100644
--- a/examples/qt3d/deferred-renderer-cpp/gbuffer.cpp
+++ b/examples/qt3d/deferred-renderer-cpp/gbuffer.cpp
@@ -61,10 +61,10 @@ GBuffer::GBuffer(Qt3DCore::QNode *parent)
};
const Qt3DRender::QRenderTargetOutput::AttachmentPoint attachmentPoints[AttachmentsCount] = {
- Qt3DRender::QRenderTargetOutput::ColorAttachment0,
- Qt3DRender::QRenderTargetOutput::ColorAttachment1,
- Qt3DRender::QRenderTargetOutput::ColorAttachment2,
- Qt3DRender::QRenderTargetOutput::DepthAttachment
+ Qt3DRender::QRenderTargetOutput::Color0,
+ Qt3DRender::QRenderTargetOutput::Color1,
+ Qt3DRender::QRenderTargetOutput::Color2,
+ Qt3DRender::QRenderTargetOutput::Depth
};
for (int i = 0; i < AttachmentsCount; i++) {
diff --git a/examples/qt3d/deferred-renderer-qml/GBuffer.qml b/examples/qt3d/deferred-renderer-qml/GBuffer.qml
index 6ed16d9ea..3111704f7 100644
--- a/examples/qt3d/deferred-renderer-qml/GBuffer.qml
+++ b/examples/qt3d/deferred-renderer-qml/GBuffer.qml
@@ -62,7 +62,7 @@ RenderTarget {
RenderTargetOutput {
objectName : "color"
- attachmentPoint : RenderAttachment.ColorAttachment0
+ attachmentPoint : RenderTargetOutput.Color0
texture : Texture2D {
id : colorAttachment
width : 1024
@@ -79,7 +79,7 @@ RenderTarget {
},
RenderTargetOutput {
objectName : "position"
- attachmentPoint : RenderAttachment.ColorAttachment1
+ attachmentPoint : RenderTargetOutput.Color1
texture : Texture2D {
id : positionAttachment
width : 1024
@@ -98,7 +98,7 @@ RenderTarget {
},
RenderTargetOutput {
objectName : "normal"
- attachmentPoint : RenderAttachment.ColorAttachment2
+ attachmentPoint : RenderTargetOutput.Color2
texture : Texture2D {
id : normalAttachment
width : 1024
@@ -117,7 +117,7 @@ RenderTarget {
},
RenderTargetOutput {
objectName : "depth"
- attachmentPoint : RenderAttachment.DepthAttachment
+ attachmentPoint : RenderTargetOutput.Depth
texture : Texture2D {
id : depthAttachment
width : 1024
diff --git a/examples/qt3d/planets-qml/PlanetFrameGraph.qml b/examples/qt3d/planets-qml/PlanetFrameGraph.qml
index 0f20b193b..a212a69af 100644
--- a/examples/qt3d/planets-qml/PlanetFrameGraph.qml
+++ b/examples/qt3d/planets-qml/PlanetFrameGraph.qml
@@ -75,7 +75,7 @@ FrameGraph {
attachments: [
RenderTargetOutput {
name: "depth"
- attachmentPoint: RenderTargetOutput.DepthAttachment
+ attachmentPoint: RenderTargetOutput.Depth
texture: Texture2D {
id: depthTexture
width: mainview.width
diff --git a/examples/qt3d/shadow-map-qml/ShadowMapFrameGraph.qml b/examples/qt3d/shadow-map-qml/ShadowMapFrameGraph.qml
index 9c9cb7ab0..07c9a9a36 100644
--- a/examples/qt3d/shadow-map-qml/ShadowMapFrameGraph.qml
+++ b/examples/qt3d/shadow-map-qml/ShadowMapFrameGraph.qml
@@ -71,7 +71,7 @@ FrameGraph {
attachments: [
RenderTargetOutput {
name: "depth"
- attachmentPoint: RenderTargetOutput.DepthAttachment
+ attachmentPoint: RenderTargetOutput.Depth
texture: Texture2D {
id: depthTexture
width: 1024
diff --git a/src/render/backend/attachmentpack.cpp b/src/render/backend/attachmentpack.cpp
index dd0df0229..1e6446cb3 100644
--- a/src/render/backend/attachmentpack.cpp
+++ b/src/render/backend/attachmentpack.cpp
@@ -72,7 +72,7 @@ void AttachmentPack::setDrawBuffers(const QList<QRenderTargetOutput::AttachmentP
Attachment::Attachment()
: m_mipLevel(0)
, m_layer(0)
- , m_point(QRenderTargetOutput::ColorAttachment0)
+ , m_point(QRenderTargetOutput::Color0)
, m_face(QRenderTargetOutput::CubeMapNegativeX)
{
}
diff --git a/src/render/backend/renderview.cpp b/src/render/backend/renderview.cpp
index 30b863702..4de6a8ff4 100644
--- a/src/render/backend/renderview.cpp
+++ b/src/render/backend/renderview.cpp
@@ -824,7 +824,7 @@ void RenderView::setShaderAndUniforms(RenderCommand *command, RenderPass *rPass,
QHash<QString, int> fragOutputs;
if (!m_renderTarget.isNull() && !shader->isLoaded()) {
Q_FOREACH (const Attachment &att, m_attachmentPack.attachments()) {
- if (att.m_point <= QRenderTargetOutput::ColorAttachment15)
+ if (att.m_point <= QRenderTargetOutput::Color15)
fragOutputs.insert(att.m_name, att.m_point);
}
}
diff --git a/src/render/frontend/qrendertargetoutput.cpp b/src/render/frontend/qrendertargetoutput.cpp
index 48bc9e5a0..12dc2aa28 100644
--- a/src/render/frontend/qrendertargetoutput.cpp
+++ b/src/render/frontend/qrendertargetoutput.cpp
@@ -48,7 +48,7 @@ namespace Qt3DRender {
QRenderTargetOutputPrivate::QRenderTargetOutputPrivate()
: QNodePrivate()
, m_texture(Q_NULLPTR)
- , m_attachmentPoint(QRenderTargetOutput::ColorAttachment0)
+ , m_attachmentPoint(QRenderTargetOutput::Color0)
, m_mipLevel(0)
, m_layer(0)
, m_face(QRenderTargetOutput::CubeMapNegativeX)
diff --git a/src/render/frontend/qrendertargetoutput.h b/src/render/frontend/qrendertargetoutput.h
index c935ab03a..2f32869fa 100644
--- a/src/render/frontend/qrendertargetoutput.h
+++ b/src/render/frontend/qrendertargetoutput.h
@@ -61,25 +61,25 @@ class QT3DRENDERSHARED_EXPORT QRenderTargetOutput : public Qt3DCore::QNode
public:
enum AttachmentPoint {
- ColorAttachment0 = 0,
- ColorAttachment1,
- ColorAttachment2,
- ColorAttachment3,
- ColorAttachment4,
- ColorAttachment5,
- ColorAttachment6,
- ColorAttachment7,
- ColorAttachment8,
- ColorAttachment9,
- ColorAttachment10,
- ColorAttachment11,
- ColorAttachment12,
- ColorAttachment13,
- ColorAttachment14,
- ColorAttachment15,
- DepthAttachment,
- StencilAttachment,
- DepthStencilAttachment
+ Color0 = 0,
+ Color1,
+ Color2,
+ Color3,
+ Color4,
+ Color5,
+ Color6,
+ Color7,
+ Color8,
+ Color9,
+ Color10,
+ Color11,
+ Color12,
+ Color13,
+ Color14,
+ Color15,
+ Depth,
+ Stencil,
+ DepthStencil
};
Q_ENUM(AttachmentPoint)
diff --git a/src/render/graphicshelpers/graphicscontext.cpp b/src/render/graphicshelpers/graphicscontext.cpp
index 3c8600eef..f5e8c3c79 100644
--- a/src/render/graphicshelpers/graphicscontext.cpp
+++ b/src/render/graphicshelpers/graphicscontext.cpp
@@ -488,7 +488,7 @@ void GraphicsContext::bindFrameBufferAttachmentHelper(GLuint fboId, const Attach
void GraphicsContext::activateDrawBuffers(const AttachmentPack &attachments)
{
- int activeDrawBuffers[QRenderTargetOutput::ColorAttachment15 + 1];
+ int activeDrawBuffers[QRenderTargetOutput::Color15 + 1];
int i = 0;
const QList<QRenderTargetOutput::AttachmentPoint> &drawBuffers = attachments.drawBuffers();
@@ -496,11 +496,11 @@ void GraphicsContext::activateDrawBuffers(const AttachmentPack &attachments)
// If drawBuffers is empty, use all the attachments as draw buffers
if (drawBuffers.isEmpty()) {
Q_FOREACH (const Attachment &attachment, attachments.attachments())
- if (attachment.m_point <= QRenderTargetOutput::ColorAttachment15)
+ if (attachment.m_point <= QRenderTargetOutput::Color15)
activeDrawBuffers[i++] = attachment.m_point;
} else {
Q_FOREACH (const QRenderTargetOutput::AttachmentPoint drawBuffer, drawBuffers)
- if (drawBuffer <= QRenderTargetOutput::ColorAttachment15)
+ if (drawBuffer <= QRenderTargetOutput::Color15)
activeDrawBuffers[i++] = drawBuffer;
}
diff --git a/src/render/graphicshelpers/graphicshelperes2.cpp b/src/render/graphicshelpers/graphicshelperes2.cpp
index c43caafcc..67e9b412e 100644
--- a/src/render/graphicshelpers/graphicshelperes2.cpp
+++ b/src/render/graphicshelpers/graphicshelperes2.cpp
@@ -320,11 +320,11 @@ void GraphicsHelperES2::bindFrameBufferAttachment(QOpenGLTexture *texture, const
{
GLenum attr = GL_COLOR_ATTACHMENT0;
- if (attachment.m_point == QRenderTargetOutput::ColorAttachment0)
+ if (attachment.m_point == QRenderTargetOutput::Color0)
attr = GL_COLOR_ATTACHMENT0;
- else if (attachment.m_point == QRenderTargetOutput::DepthAttachment)
+ else if (attachment.m_point == QRenderTargetOutput::Depth)
attr = GL_DEPTH_ATTACHMENT;
- else if (attachment.m_point == QRenderTargetOutput::StencilAttachment)
+ else if (attachment.m_point == QRenderTargetOutput::Stencil)
attr = GL_STENCIL_ATTACHMENT;
else
qCritical() << "Unsupported FBO attachment OpenGL ES 2.0";
diff --git a/src/render/graphicshelpers/graphicshelpergl2.cpp b/src/render/graphicshelpers/graphicshelpergl2.cpp
index 9779e4cd7..4bccace16 100644
--- a/src/render/graphicshelpers/graphicshelpergl2.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl2.cpp
@@ -301,11 +301,11 @@ void GraphicsHelperGL2::bindFrameBufferAttachment(QOpenGLTexture *texture, const
if (m_fboFuncs != Q_NULLPTR) {
GLenum attr = GL_DEPTH_STENCIL_ATTACHMENT;
- if (attachment.m_point <= QRenderTargetOutput::ColorAttachment15)
+ if (attachment.m_point <= QRenderTargetOutput::Color15)
attr = GL_COLOR_ATTACHMENT0 + attachment.m_point;
- else if (attachment.m_point == QRenderTargetOutput::DepthAttachment)
+ else if (attachment.m_point == QRenderTargetOutput::Depth)
attr = GL_DEPTH_ATTACHMENT;
- else if (attachment.m_point == QRenderTargetOutput::StencilAttachment)
+ else if (attachment.m_point == QRenderTargetOutput::Stencil)
attr = GL_STENCIL_ATTACHMENT;
else
qCritical() << "DepthStencil Attachment not supported on OpenGL 2.0";
diff --git a/src/render/graphicshelpers/graphicshelpergl3.cpp b/src/render/graphicshelpers/graphicshelpergl3.cpp
index afce394e0..385e953e0 100644
--- a/src/render/graphicshelpers/graphicshelpergl3.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl3.cpp
@@ -351,11 +351,11 @@ void GraphicsHelperGL3::bindFrameBufferAttachment(QOpenGLTexture *texture, const
{
GLenum attr = GL_DEPTH_STENCIL_ATTACHMENT;
- if (attachment.m_point <= QRenderTargetOutput::ColorAttachment15)
+ if (attachment.m_point <= QRenderTargetOutput::Color15)
attr = GL_COLOR_ATTACHMENT0 + attachment.m_point;
- else if (attachment.m_point == QRenderTargetOutput::DepthAttachment)
+ else if (attachment.m_point == QRenderTargetOutput::Depth)
attr = GL_DEPTH_ATTACHMENT;
- else if (attachment.m_point == QRenderTargetOutput::StencilAttachment)
+ else if (attachment.m_point == QRenderTargetOutput::Stencil)
attr = GL_STENCIL_ATTACHMENT;
texture->bind();
diff --git a/src/render/graphicshelpers/graphicshelpergl3_3.cpp b/src/render/graphicshelpers/graphicshelpergl3_3.cpp
index 90b670349..55de0e08b 100644
--- a/src/render/graphicshelpers/graphicshelpergl3_3.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl3_3.cpp
@@ -348,11 +348,11 @@ void GraphicsHelperGL3_3::bindFrameBufferAttachment(QOpenGLTexture *texture, con
{
GLenum attr = GL_DEPTH_STENCIL_ATTACHMENT;
- if (attachment.m_point <= QRenderTargetOutput::ColorAttachment15)
+ if (attachment.m_point <= QRenderTargetOutput::Color15)
attr = GL_COLOR_ATTACHMENT0 + attachment.m_point;
- else if (attachment.m_point == QRenderTargetOutput::DepthAttachment)
+ else if (attachment.m_point == QRenderTargetOutput::Depth)
attr = GL_DEPTH_ATTACHMENT;
- else if (attachment.m_point == QRenderTargetOutput::StencilAttachment)
+ else if (attachment.m_point == QRenderTargetOutput::Stencil)
attr = GL_STENCIL_ATTACHMENT;
texture->bind();
diff --git a/src/render/graphicshelpers/graphicshelpergl4.cpp b/src/render/graphicshelpers/graphicshelpergl4.cpp
index bd4ec8615..ea15f9a01 100644
--- a/src/render/graphicshelpers/graphicshelpergl4.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl4.cpp
@@ -341,11 +341,11 @@ void GraphicsHelperGL4::bindFrameBufferAttachment(QOpenGLTexture *texture, const
{
GLenum attr = GL_DEPTH_STENCIL_ATTACHMENT;
- if (attachment.m_point <= QRenderTargetOutput::ColorAttachment15)
+ if (attachment.m_point <= QRenderTargetOutput::Color15)
attr = GL_COLOR_ATTACHMENT0 + attachment.m_point;
- else if (attachment.m_point == QRenderTargetOutput::DepthAttachment)
+ else if (attachment.m_point == QRenderTargetOutput::Depth)
attr = GL_DEPTH_ATTACHMENT;
- else if (attachment.m_point == QRenderTargetOutput::StencilAttachment)
+ else if (attachment.m_point == QRenderTargetOutput::Stencil)
attr = GL_STENCIL_ATTACHMENT;
texture->bind();
diff --git a/tests/auto/render/qrendertargetselector/tst_qrendertargetselector.cpp b/tests/auto/render/qrendertargetselector/tst_qrendertargetselector.cpp
index 249c476ea..7012ccff9 100644
--- a/tests/auto/render/qrendertargetselector/tst_qrendertargetselector.cpp
+++ b/tests/auto/render/qrendertargetselector/tst_qrendertargetselector.cpp
@@ -73,7 +73,7 @@ private Q_SLOTS:
Qt3DRender::QRenderTargetSelector *renderTargetSelectorWithTargetAndBuffers = new Qt3DRender::QRenderTargetSelector();
Qt3DRender::QRenderTarget *target2 = new Qt3DRender::QRenderTarget();
renderTargetSelectorWithTargetAndBuffers->setTarget(target2);
- QList<Qt3DRender::QRenderTargetOutput::AttachmentPoint> attachmentPoints = QList<Qt3DRender::QRenderTargetOutput::AttachmentPoint>() << Qt3DRender::QRenderTargetOutput::ColorAttachment0 << Qt3DRender::QRenderTargetOutput::DepthAttachment;
+ QList<Qt3DRender::QRenderTargetOutput::AttachmentPoint> attachmentPoints = QList<Qt3DRender::QRenderTargetOutput::AttachmentPoint>() << Qt3DRender::QRenderTargetOutput::Color0 << Qt3DRender::QRenderTargetOutput::Depth;
renderTargetSelectorWithTargetAndBuffers->setDrawBuffers(attachmentPoints);
QTest::newRow("renderTargetSelectorWithTargetAndDrawBuffers") << renderTargetSelectorWithTargetAndBuffers << attachmentPoints << target2;
}
@@ -151,7 +151,7 @@ private Q_SLOTS:
// WHEN
QList<Qt3DRender::QRenderTargetOutput::AttachmentPoint> drawBuffers;
- drawBuffers << Qt3DRender::QRenderTargetOutput::ColorAttachment0 << Qt3DRender::QRenderTargetOutput::DepthAttachment;
+ drawBuffers << Qt3DRender::QRenderTargetOutput::Color0 << Qt3DRender::QRenderTargetOutput::Depth;
renderTargetSelector->setDrawBuffers(drawBuffers);
QCoreApplication::processEvents();