aboutsummaryrefslogtreecommitdiff
path: root/src/gl-visual-config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gl-visual-config.cpp')
-rw-r--r--src/gl-visual-config.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gl-visual-config.cpp b/src/gl-visual-config.cpp
index 4e9ab93..dbd87d2 100644
--- a/src/gl-visual-config.cpp
+++ b/src/gl-visual-config.cpp
@@ -26,7 +26,7 @@
#include <vector>
GLVisualConfig::GLVisualConfig(const std::string &s) :
- red(1), green(1), blue(1), alpha(1), depth(1), buffer(1)
+ red(1), green(1), blue(1), alpha(1), depth(1), stencil(0), buffer(1)
{
std::vector<std::string> elems;
@@ -50,6 +50,8 @@ GLVisualConfig::GLVisualConfig(const std::string &s) :
alpha = Util::fromString<int>(opt[1]);
else if (opt[0] == "d" || opt[0] == "depth")
depth = Util::fromString<int>(opt[1]);
+ else if (opt[0] == "s" || opt[0] == "stencil")
+ stencil = Util::fromString<int>(opt[1]);
else if (opt[0] == "buf" || opt[0] == "buffer")
buffer = Util::fromString<int>(opt[1]);
}
@@ -74,6 +76,7 @@ GLVisualConfig::match_score(const GLVisualConfig &target) const
score += score_component(blue, target.blue, 4);
score += score_component(alpha, target.alpha, 4);
score += score_component(depth, target.depth, 1);
+ score += score_component(stencil, target.stencil, 0);
score += score_component(buffer, target.buffer, 1);
return score;