src/glRenderer.cpp

changeset 973
c1b60c7d5135
parent 971
c00f9665a9f8
child 978
4603d8fd063e
equal deleted inserted replaced
972:a34b73114823 973:c1b60c7d5135
49 {{ -1, 0, 0 }, X, Z, false, true, true }, // bottom 49 {{ -1, 0, 0 }, X, Z, false, true, true }, // bottom
50 {{ 0, 0, 0 }, X, Y, true, true, true }, // back 50 {{ 0, 0, 0 }, X, Y, true, true, true }, // back
51 {{ 0, -1, 0 }, Z, Y, false, true, true }, // right 51 {{ 0, -1, 0 }, Z, Y, false, true, true }, // right
52 }; 52 };
53 53
54 ConfigOption (QString BackgroundColor = "#FFFFFF") 54 ConfigOption (QColor BackgroundColor = "#FFFFFF")
55 ConfigOption (QString MainColor = "#A0A0A0") 55 ConfigOption (QColor MainColor = "#A0A0A0")
56 ConfigOption (float MainColorAlpha = 1.0) 56 ConfigOption (float MainColorAlpha = 1.0)
57 ConfigOption (int LineThickness = 2) 57 ConfigOption (int LineThickness = 2)
58 ConfigOption (bool BfcRedGreenView = false) 58 ConfigOption (bool BfcRedGreenView = false)
59 ConfigOption (int Camera = 6) 59 ConfigOption (int Camera = 6)
60 ConfigOption (bool BlackEdges = false) 60 ConfigOption (bool BlackEdges = false)
312 { 312 {
313 glClearColor (0.0f, 0.0f, 0.0f, 1.0f); 313 glClearColor (0.0f, 0.0f, 0.0f, 1.0f);
314 return; 314 return;
315 } 315 }
316 316
317 QColor col (m_config->backgroundColor()); 317 QColor color = m_config->backgroundColor();
318 318
319 if (not col.isValid()) 319 if (not color.isValid())
320 return; 320 return;
321 321
322 col.setAlpha (255); 322 color.setAlpha (255);
323 323 m_darkbg = Luma (color) < 80;
324 m_darkbg = Luma (col) < 80; 324 m_bgcolor = color;
325 m_bgcolor = col; 325 qglClearColor (color);
326 qglClearColor (col);
327 } 326 }
328 327
329 // ============================================================================= 328 // =============================================================================
330 // 329 //
331 void GLRenderer::refresh() 330 void GLRenderer::refresh()

mercurial