src/gl/compiler.h

changeset 51
1a9eac27698d
parent 50
0f80a2e5e42b
child 73
97df974b5ed5
--- a/src/gl/compiler.h	Fri Feb 07 02:02:16 2020 +0200
+++ b/src/gl/compiler.h	Fri Feb 07 23:59:06 2020 +0200
@@ -41,6 +41,7 @@
 		glm::vec4 color;
 		glm::vec3 normal;
 		glm::int32 id;
+		glm::int32 selected = 0;
 	};
 }
 
@@ -55,11 +56,12 @@
 	std::size_t vertexCount(gl::ArrayClass arrayClass) const;
 	QColor getColorForPolygon(const gl::Polygon& polygon, const RenderPreferences& preferences);
 	glm::vec3 modelCenter() const;
-	float modelDistance() const;
+	double modelDistance() const;
 	void initialize();
 	void bindVertexArray(gl::ArrayClass arrayClass);
 	void releaseVertexArray(gl::ArrayClass arrayClass);
 	void buildShaders(int arrayId);
+	void setSelectedObjects(const QSet<ldraw::Id> ids);
 
 	static ldraw::Id idFromColor(const std::array<GLbyte, 3>& data);
 
@@ -95,6 +97,7 @@
 		QOpenGLShaderProgram* pickSceneProgram = nullptr;
 		QOpenGLBuffer buffer{QOpenGLBuffer::VertexBuffer};
 		QOpenGLVertexArrayObject vertexArray;
+		std::vector<gl::Vertex> cachedData;
 	} glObjects[gl::NUM_ARRAY_CLASSES];
 };
 

mercurial