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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-05-07 18:14:36 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-05-07 18:16:23 +0400
commitfe0236be78bf1ab79037fb238db353d2c6820e98 (patch)
tree566367a110845925434bddf68130d1f760850cdc /source/blender/freestyle/intern/stroke/Stroke.h
parentdfe800b4a80a39e95013b3695db87b5abe587d5f (diff)
Freestyle: time/space optimization in stroke rendering without textures.
When strokes do not have textures assigned, UV coordinates are not computed now. This will save a bit of time and space in stroke rendering.
Diffstat (limited to 'source/blender/freestyle/intern/stroke/Stroke.h')
-rw-r--r--source/blender/freestyle/intern/stroke/Stroke.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/stroke/Stroke.h b/source/blender/freestyle/intern/stroke/Stroke.h
index 27a105bb1cc..d6c8c4f0d07 100644
--- a/source/blender/freestyle/intern/stroke/Stroke.h
+++ b/source/blender/freestyle/intern/stroke/Stroke.h
@@ -652,6 +652,12 @@ public:
inline MTex *getMTex(int idx) {
return _mtex[idx];}
+ /*! Returns true if this Stroke has textures assigned, false otherwise. */
+ inline bool hasTex() const
+ {
+ return _mtex[0] != NULL;
+ }
+
/*! Returns true if this Stroke uses a texture with tips, false otherwise. */
inline bool hasTips() const
{