77 print ("OpenGL ERROR: at %1:%2: %3", basename (String (file)), line, errmsg); |
77 print ("OpenGL ERROR: at %1:%2: %3", basename (String (file)), line, errmsg); |
78 } |
78 } |
79 |
79 |
80 // ============================================================================= |
80 // ============================================================================= |
81 // |
81 // |
82 GLCompiler::GLCompiler() |
82 GLCompiler::GLCompiler (GLRenderer* renderer) : |
|
83 m_renderer (renderer) |
83 { |
84 { |
84 needMerge(); |
85 needMerge(); |
85 memset (m_vboSizes, 0, sizeof m_vboSizes); |
86 memset (m_vboSizes, 0, sizeof m_vboSizes); |
86 } |
87 } |
87 |
88 |
192 } |
193 } |
193 |
194 |
194 return qcol; |
195 return qcol; |
195 } |
196 } |
196 |
197 |
|
198 double blendAlpha = 0.0; |
|
199 |
197 if (topobj->isSelected()) |
200 if (topobj->isSelected()) |
198 { |
201 blendAlpha = 1.0; |
199 // Brighten it up for the select list. |
202 elif (topobj == m_renderer->objectAtCursor()) |
|
203 blendAlpha = 0.5; |
|
204 |
|
205 if (blendAlpha != 0.0) |
|
206 { |
200 QColor selcolor (cfg::selectColorBlend); |
207 QColor selcolor (cfg::selectColorBlend); |
201 qcol.setRed ((qcol.red() + selcolor.red()) / 2); |
208 double denom = blendAlpha + 1.0; |
202 qcol.setGreen ((qcol.green() + selcolor.green()) / 2); |
209 qcol.setRed ((qcol.red() + (selcolor.red() * blendAlpha)) / denom); |
203 qcol.setBlue ((qcol.blue() + selcolor.blue()) / 2); |
210 qcol.setGreen ((qcol.green() + (selcolor.green() * blendAlpha)) / denom); |
|
211 qcol.setBlue ((qcol.blue() + (selcolor.blue() * blendAlpha)) / denom); |
204 } |
212 } |
205 |
213 |
206 return qcol; |
214 return qcol; |
207 } |
215 } |
208 |
216 |