Reimplement drawing system with vertex buffers.
Now with 10000% more performance.
This commit is contained in:
23
src/FlatLayerVisualisation.hpp
Normal file
23
src/FlatLayerVisualisation.hpp
Normal 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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user