Reimplement drawing system with vertex buffers.

Now with 10000% more performance.
This commit is contained in:
2017-11-23 14:43:31 +01:00
parent a62075f57d
commit f289b2f52b
9 changed files with 232 additions and 103 deletions

View File

@@ -0,0 +1,23 @@
#pragma once
#include <vector>
#include "LayerData.hpp"
#include "LayerVisualisation.hpp"
namespace fmri
{
class FlatLayerVisualisation : public LayerVisualisation
{
public:
explicit FlatLayerVisualisation(const LayerData& layer);
void render() override;
private:
std::size_t faceCount;
std::vector<float> vertexBuffer;
std::vector<float> colorBuffer;
std::vector<int> indexBuffer;
};
}