Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/freestyle/intern/scene_graph')
-rw-r--r--source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp9
-rw-r--r--source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h15
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeViewLayer.cpp (renamed from source/blender/freestyle/intern/scene_graph/NodeSceneRenderLayer.cpp)8
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeViewLayer.h (renamed from source/blender/freestyle/intern/scene_graph/NodeSceneRenderLayer.h)24
-rw-r--r--source/blender/freestyle/intern/scene_graph/SceneHash.cpp4
-rw-r--r--source/blender/freestyle/intern/scene_graph/SceneHash.h4
-rw-r--r--source/blender/freestyle/intern/scene_graph/SceneVisitor.h4
7 files changed, 22 insertions, 46 deletions
diff --git a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp
index 9c462bb6b2b..6f5491fc8ef 100644
--- a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp
+++ b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp
@@ -51,7 +51,6 @@ IndexedFaceSet::IndexedFaceSet() : Rep()
_MISize = 0;
_TIndices = NULL;
_TISize = 0;
- _displayList = 0;
}
IndexedFaceSet::IndexedFaceSet(float *iVertices, unsigned iVSize, float *iNormals, unsigned iNSize,
@@ -150,8 +149,6 @@ IndexedFaceSet::IndexedFaceSet(float *iVertices, unsigned iVSize, float *iNormal
_TISize = iTISize;
_TIndices = iTIndices;
}
-
- _displayList = 0;
}
IndexedFaceSet::IndexedFaceSet(const IndexedFaceSet& iBrother) : Rep(iBrother)
@@ -215,8 +212,6 @@ IndexedFaceSet::IndexedFaceSet(const IndexedFaceSet& iBrother) : Rep(iBrother)
_TIndices = new unsigned[_TISize];
memcpy(_TIndices, iBrother.tindices(), _TISize * sizeof(unsigned));
}
-
- _displayList = 0;
}
IndexedFaceSet::~IndexedFaceSet()
@@ -276,10 +271,6 @@ IndexedFaceSet::~IndexedFaceSet()
delete[] _TIndices;
_TIndices = NULL;
}
-
- // should find a way to deallocates the displayList
- // glDeleteLists(GLuint list, GLSizei range)
- _displayList = 0;
}
void IndexedFaceSet::accept(SceneVisitor& v)
diff --git a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h
index a8fe3d8bbfa..c1a5b2a6774 100644
--- a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h
+++ b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h
@@ -150,8 +150,6 @@ public:
std::swap(_MISize, ioOther._MISize);
std::swap(_TISize, ioOther._TISize);
- std::swap(_displayList, ioOther._displayList);
-
Rep::swap(ioOther);
}
@@ -173,12 +171,6 @@ public:
/*! Compute the Bounding Box */
virtual void ComputeBBox();
- /*! modifiers */
- inline void setDisplayList(unsigned int index)
- {
- _displayList = index;
- }
-
/*! Accessors */
virtual const float *vertices() const
{
@@ -280,11 +272,6 @@ public:
return _TISize;
}
- inline unsigned int displayList() const
- {
- return _displayList;
- }
-
protected:
float *_Vertices;
float *_Normals;
@@ -311,8 +298,6 @@ protected:
unsigned _MISize;
unsigned _TISize;
- unsigned int _displayList;
-
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:IndexedFaceSet")
#endif
diff --git a/source/blender/freestyle/intern/scene_graph/NodeSceneRenderLayer.cpp b/source/blender/freestyle/intern/scene_graph/NodeViewLayer.cpp
index 24c56ff4e28..701c5caa91d 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeSceneRenderLayer.cpp
+++ b/source/blender/freestyle/intern/scene_graph/NodeViewLayer.cpp
@@ -18,18 +18,18 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/freestyle/intern/scene_graph/NodeSceneRenderLayer.cpp
+/** \file blender/freestyle/intern/scene_graph/NodeViewLayer.cpp
* \ingroup freestyle
* \brief Class to represent a scene render layer in Blender.
*/
-#include "NodeSceneRenderLayer.h"
+#include "NodeViewLayer.h"
namespace Freestyle {
-void NodeSceneRenderLayer::accept(SceneVisitor& v)
+void NodeViewLayer::accept(SceneVisitor& v)
{
- v.visitNodeSceneRenderLayer(*this);
+ v.visitNodeViewLayer(*this);
}
} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/scene_graph/NodeSceneRenderLayer.h b/source/blender/freestyle/intern/scene_graph/NodeViewLayer.h
index 8dc93d84201..cc64fda60b6 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeSceneRenderLayer.h
+++ b/source/blender/freestyle/intern/scene_graph/NodeViewLayer.h
@@ -18,38 +18,38 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef __FREESTYLE_NODE_SCENE_RENDER_LAYER_H__
-#define __FREESTYLE_NODE_SCENE_RENDER_LAYER_H__
+#ifndef __FREESTYLE_NODE_VIEW_LAYER_H__
+#define __FREESTYLE_NODE_VIEW_LAYER_H__
-/** \file blender/freestyle/intern/scene_graph/NodeSceneRenderLayer.h
+/** \file blender/freestyle/intern/scene_graph/NodeViewLayer.h
* \ingroup freestyle
- * \brief Class to represent a scene render layer in Blender.
+ * \brief Class to represent a view layer in Blender.
*/
#include "Node.h"
extern "C" {
-#include "DNA_scene_types.h" /* for Scene and SceneRenderLayer */
+#include "DNA_scene_types.h" /* for Scene and ViewLayer */
}
using namespace std;
namespace Freestyle {
-class NodeSceneRenderLayer : public Node
+class NodeViewLayer : public Node
{
public:
- inline NodeSceneRenderLayer(Scene& scene, SceneRenderLayer& srl) : Node(), _Scene(scene), _SceneRenderLayer(srl) {}
- virtual ~NodeSceneRenderLayer() {}
+ inline NodeViewLayer(Scene& scene, ViewLayer& view_layer) : Node(), _Scene(scene), _ViewLayer(view_layer) {}
+ virtual ~NodeViewLayer() {}
inline struct Scene& scene() const
{
return _Scene;
}
- inline struct SceneRenderLayer& sceneRenderLayer() const
+ inline struct ViewLayer& sceneLayer() const
{
- return _SceneRenderLayer;
+ return _ViewLayer;
}
/*! Accept the corresponding visitor */
@@ -58,9 +58,9 @@ public:
protected:
Scene& _Scene;
- SceneRenderLayer& _SceneRenderLayer;
+ ViewLayer& _ViewLayer;
};
} /* namespace Freestyle */
-#endif // __FREESTYLE_NODE_SCENE_RENDER_LAYER_H__
+#endif // __FREESTYLE_NODE_VIEW_LAYER_H__
diff --git a/source/blender/freestyle/intern/scene_graph/SceneHash.cpp b/source/blender/freestyle/intern/scene_graph/SceneHash.cpp
index 2af02ab5764..16c353678c1 100644
--- a/source/blender/freestyle/intern/scene_graph/SceneHash.cpp
+++ b/source/blender/freestyle/intern/scene_graph/SceneHash.cpp
@@ -35,14 +35,14 @@ string SceneHash::toString()
return ss.str();
}
-void SceneHash::visitNodeSceneRenderLayer(NodeSceneRenderLayer& node)
+void SceneHash::visitNodeViewLayer(NodeViewLayer& node)
{
struct RenderData *r = &node.scene().r;
adler32((unsigned char *)&r->xsch, sizeof(r->xsch)); // resolution_x
adler32((unsigned char *)&r->ysch, sizeof(r->ysch)); // resolution_y
adler32((unsigned char *)&r->size, sizeof(r->size)); // resolution_percentage
- struct FreestyleConfig *config = &node.sceneRenderLayer().freestyleConfig;
+ struct FreestyleConfig *config = &node.sceneLayer().freestyle_config;
adler32((unsigned char *)&config->flags, sizeof(config->flags));
adler32((unsigned char *)&config->crease_angle, sizeof(config->crease_angle));
adler32((unsigned char *)&config->sphere_radius, sizeof(config->sphere_radius));
diff --git a/source/blender/freestyle/intern/scene_graph/SceneHash.h b/source/blender/freestyle/intern/scene_graph/SceneHash.h
index 9da711673f0..662b4bba8f1 100644
--- a/source/blender/freestyle/intern/scene_graph/SceneHash.h
+++ b/source/blender/freestyle/intern/scene_graph/SceneHash.h
@@ -26,7 +26,7 @@
*/
#include "IndexedFaceSet.h"
-#include "NodeSceneRenderLayer.h"
+#include "NodeViewLayer.h"
#include "NodeCamera.h"
#include "SceneVisitor.h"
@@ -49,7 +49,7 @@ public:
virtual ~SceneHash() {}
VISIT_DECL(NodeCamera)
- VISIT_DECL(NodeSceneRenderLayer)
+ VISIT_DECL(NodeViewLayer)
VISIT_DECL(IndexedFaceSet)
string toString();
diff --git a/source/blender/freestyle/intern/scene_graph/SceneVisitor.h b/source/blender/freestyle/intern/scene_graph/SceneVisitor.h
index 712585c4064..d76e48980bf 100644
--- a/source/blender/freestyle/intern/scene_graph/SceneVisitor.h
+++ b/source/blender/freestyle/intern/scene_graph/SceneVisitor.h
@@ -56,7 +56,7 @@ class NodeLight;
class NodeCamera;
class NodeDrawingStyle;
class NodeTransform;
-class NodeSceneRenderLayer;
+class NodeViewLayer;
class Rep;
class LineRep;
@@ -88,7 +88,7 @@ public:
VISIT_COMPLETE_DEF(NodeCamera)
VISIT_COMPLETE_DEF(NodeDrawingStyle)
VISIT_COMPLETE_DEF(NodeTransform)
- VISIT_COMPLETE_DEF(NodeSceneRenderLayer)
+ VISIT_COMPLETE_DEF(NodeViewLayer)
VISIT_COMPLETE_DEF(Rep)
VISIT_COMPLETE_DEF(LineRep)