From 389da8159978571e8156ff7692bc595d957e846e Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 23 Feb 2019 16:10:08 +0100 Subject: Store material in fluid buffer and improve visualization Replaces the density value which is actually not that useful for visualization. Encoding integer values as floats by casting and comparing them using exact floating point comparison is not very safe but works out for now. --- src/buffer/vertex/fluid_cell_buffer.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/buffer/vertex/fluid_cell_buffer.h') diff --git a/src/buffer/vertex/fluid_cell_buffer.h b/src/buffer/vertex/fluid_cell_buffer.h index 9e535cb..8afb342 100644 --- a/src/buffer/vertex/fluid_cell_buffer.h +++ b/src/buffer/vertex/fluid_cell_buffer.h @@ -2,6 +2,8 @@ #include +#include + class FluidCellBuffer { private: const GLuint _nX; @@ -11,7 +13,7 @@ private: GLuint _buffer; public: - FluidCellBuffer(GLuint nX, GLuint nY); + FluidCellBuffer(GLuint nX, GLuint nY, std::function&& geometry); ~FluidCellBuffer(); GLuint getBuffer() const; -- cgit v1.2.3