43 { GL_OUT_OF_MEMORY, "Out of memory" }, |
43 { GL_OUT_OF_MEMORY, "Out of memory" }, |
44 { GL_STACK_UNDERFLOW, "The operation would have caused an underflow" }, |
44 { GL_STACK_UNDERFLOW, "The operation would have caused an underflow" }, |
45 { GL_STACK_OVERFLOW, "The operation would have caused an overflow" }, |
45 { GL_STACK_OVERFLOW, "The operation would have caused an overflow" }, |
46 }; |
46 }; |
47 |
47 |
48 CFGENTRY (String, SelectColorBlend, "#0080FF") |
48 ConfigOption (QString SelectColorBlend = "#0080FF") |
49 EXTERN_CFGENTRY (Bool, BlackEdges) |
|
50 EXTERN_CFGENTRY (String, BackgroundColor) |
|
51 |
49 |
52 static QList<int> g_warnedColors; |
50 static QList<int> g_warnedColors; |
53 static const QColor g_BFCFrontColor (64, 192, 80); |
51 static const QColor g_BFCFrontColor (64, 192, 80); |
54 static const QColor g_BFCBackColor (208, 64, 64); |
52 static const QColor g_BFCBackColor (208, 64, 64); |
55 |
53 |
78 } |
76 } |
79 |
77 |
80 // ============================================================================= |
78 // ============================================================================= |
81 // |
79 // |
82 GLCompiler::GLCompiler (GLRenderer* renderer) : |
80 GLCompiler::GLCompiler (GLRenderer* renderer) : |
|
81 HierarchyElement (parent), |
83 m_renderer (renderer) |
82 m_renderer (renderer) |
84 { |
83 { |
85 needMerge(); |
84 needMerge(); |
86 memset (m_vboSizes, 0, sizeof m_vboSizes); |
85 memset (m_vboSizes, 0, sizeof m_vboSizes); |
87 } |
86 } |
206 else if (topobj == m_renderer->objectAtCursor()) |
205 else if (topobj == m_renderer->objectAtCursor()) |
207 blendAlpha = 0.5; |
206 blendAlpha = 0.5; |
208 |
207 |
209 if (blendAlpha != 0.0) |
208 if (blendAlpha != 0.0) |
210 { |
209 { |
211 QColor selcolor (cfg::SelectColorBlend); |
210 QColor selcolor (m_config->selectColorBlend); |
212 double denom = blendAlpha + 1.0; |
211 double denom = blendAlpha + 1.0; |
213 qcol.setRed ((qcol.red() + (selcolor.red() * blendAlpha)) / denom); |
212 qcol.setRed ((qcol.red() + (selcolor.red() * blendAlpha)) / denom); |
214 qcol.setGreen ((qcol.green() + (selcolor.green() * blendAlpha)) / denom); |
213 qcol.setGreen ((qcol.green() + (selcolor.green() * blendAlpha)) / denom); |
215 qcol.setBlue ((qcol.blue() + (selcolor.blue() * blendAlpha)) / denom); |
214 qcol.setBlue ((qcol.blue() + (selcolor.blue() * blendAlpha)) / denom); |
216 } |
215 } |