Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Goers <mega@osirion.org>2012-01-21 03:19:55 +0000
committerEvan Goers <mega@osirion.org>2012-01-21 03:19:55 +0000
commitd702c133c06cd9626430263292df69b092954c5f (patch)
treef0f206edef1e3c3fdddf16a63947d938cc17d86b /src/model/material.cc
parent8090b641248e41334c76c5fead274f01d7d287a2 (diff)
Add a 'decal' macro material flag. Material flag 'Decal' enables polygon offsetting and alpha testing on the surface.
Diffstat (limited to 'src/model/material.cc')
-rw-r--r--src/model/material.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/model/material.cc b/src/model/material.cc
index 56bb3fc..b76be02 100644
--- a/src/model/material.cc
+++ b/src/model/material.cc
@@ -50,7 +50,7 @@ void Material::print()
} else if (flags() & Primary) {
con_print << "entity ";
}
-
+
if (flags() & Bright) {
con_print << "bright ";
}
@@ -71,7 +71,10 @@ void Material::print()
}
if (flags() & Origin) {
con_print << "origin ";
- }
+ }
+ if (flags() & Decal) {
+ con_print << "decal ";
+ }
}
con_print << std::endl;
@@ -243,6 +246,8 @@ void Material::load_shader(const std::string &shadername)
material->set_flags(Clip);
} else if (firstword.compare("origin") == 0) {
material->set_flags(Origin);
+ } else if (firstword.compare("decal") == 0) {
+ material->set_flags(Decal);
} else if (firstword.compare("qer_editorimage") == 0) {
// keyword qer_editorimage is ignored
continue;