src/polygoncache.h

Thu, 09 Jun 2022 13:32:55 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Thu, 09 Jun 2022 13:32:55 +0300
changeset 210
232e7634cc8a
parent 206
654661eab7f3
child 211
b27b90fb993f
permissions
-rw-r--r--

more refactoring, dosn't build yet

#pragma once
#include "basics.h"
#include "model.h"
#include "gl/common.h"

template<typename T>
struct WithId : T
{
	ModelId id;
};

struct GetPolygonsContext
{
	ModelId modelId;
	class DocumentManager* documents;
};

struct PolygonCache
{
	std::vector<WithId<PolygonElement>> cachedPolygons;
	bool needRecache = true;
};

const std::vector<WithId<PolygonElement>>& getCachedPolygons(
	PolygonCache* cache,
	Model* model,
	class DocumentManager* documents);

mercurial