summaryrefslogtreecommitdiffstats
path: root/src/render/io/gltfparser.cpp
diff options
context:
space:
mode:
authorLouai Al-Khanji <louai.al-khanji@digia.com>2014-08-15 13:39:14 +0300
committerLouai Al-Khanji <louai.al-khanji@digia.com>2014-08-15 14:57:35 +0200
commit35e00094cefd43200df96ba09f548486a86bdef4 (patch)
tree69d677aff4995fab76cb16e3836ad909f462e24d /src/render/io/gltfparser.cpp
parent37b1b13ef5f7f0b8c8ab712d57d681ef5f0c45d5 (diff)
Avoid naming classes DrawState
Since winuser.h contains a DrawState #define, this tends to wreck havoc on Windows. This patch respectively renames QDrawState, Qt3D::Render::DrawState and Qt3D::Render::DrawStateSet to QRenderState, Qt3D::Render::RenderState and Qt3D::Render::RenderStateSet. While this is more invasive than just undefining DrawState, it should be more foolproof too. Change-Id: I9fa86e5bf1fe41fb4839bd146822cc43e26019e6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/io/gltfparser.cpp')
-rw-r--r--src/render/io/gltfparser.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/render/io/gltfparser.cpp b/src/render/io/gltfparser.cpp
index 4464ef335..76c7ba27d 100644
--- a/src/render/io/gltfparser.cpp
+++ b/src/render/io/gltfparser.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt3D module of the Qt Toolkit.
@@ -70,7 +71,7 @@
#include <QVector3D>
// need to move these to somewhere common?
-#include <drawstate.h>
+#include <renderstate.h>
#include <states/blendstate.h>
QT_BEGIN_NAMESPACE
@@ -869,10 +870,10 @@ void GLTFParser::processJSONTechnique( QString id, QJsonObject jsonObj )
} // of program-instance attributes
QJsonObject states = po.value(KEY_STATES).toObject();
- Render::DrawStateSet* ss = new Render::DrawStateSet;
+ Render::RenderStateSet* ss = new Render::RenderStateSet;
Q_FOREACH (QString stateName, states.keys()) {
- Render::DrawState* s= buildState(stateName.toUtf8(), states.value(stateName));
+ Render::RenderState* s= buildState(stateName.toUtf8(), states.value(stateName));
if (!s)
continue;
@@ -886,7 +887,7 @@ void GLTFParser::processJSONTechnique( QString id, QJsonObject jsonObj )
m_techniques[id] = t;
}
-Render::DrawState* GLTFParser::buildState(const QByteArray& nm, QJsonValue v)
+Render::RenderState* GLTFParser::buildState(const QByteArray& nm, QJsonValue v)
{
if (nm == "blendEnable") {
return NULL; // will see a blendEquation spec too