src/gl/compiler.cpp

changeset 376
3cef3b016330
parent 374
75efc3ba5a56
--- a/src/gl/compiler.cpp	Tue Apr 11 20:27:04 2023 +0300
+++ b/src/gl/compiler.cpp	Tue Apr 11 22:39:18 2023 +0300
@@ -236,19 +236,19 @@
 
 static QColor getColorForPolygon(
 	const PolygonElement& polygon,
-	const gl::RenderPreferences& preferences,
+	const gl::build_preferences* preferences,
 	const ColorTable& colorTable)
 {
 	QColor color;
 	// For normal colors, use the polygon's color.
 	if (polygon.color == MAIN_COLOR)
 	{
-		color = preferences.mainColor;
+		color = preferences->mainColor;
 	}
 	else if (polygon.color == EDGE_COLOR)
 	{
 		// Edge color is black, unless we have a dark background, in which case lines need to be bright.
-		color = luma(preferences.backgroundColor) > (40.0 / 256.0) ? Qt::black : Qt::white;
+		color = luma(preferences->backgroundColor) > (40.0 / 256.0) ? Qt::black : Qt::white;
 	}
 	else
 	{
@@ -281,7 +281,7 @@
 	QTextDocument* model,
 	const ColorTable& colorTable,
 	DocumentManager* context,
-	const gl::RenderPreferences& preferences)
+	const gl::build_preferences* preferences)
 {
 	for (gl::ModelShaders::ShaderObject& shader : shaders->shaderObjects) {
 		shader.cachedData.clear();

mercurial