Files
MapLibreParticleLab/include/llmr/shader/line_shader.hpp
2014-03-12 15:25:39 +01:00

46 lines
963 B
C++

#ifndef LLMR_SHADER_SHADER_LINE
#define LLMR_SHADER_SHADER_LINE
#include <llmr/shader/shader.hpp>
namespace llmr {
class LineShader : public Shader {
public:
LineShader();
void bind(char *offset);
void setExtrudeMatrix(const std::array<float, 16>& exmatrix);
void setColor(const std::array<float, 4>& color);
void setLineWidth(const std::array<float, 2>& linewidth);
void setRatio(float ratio);
void setDashArray(const std::array<float, 2>& dasharray);
void setDebug(float debug);
private:
int32_t a_pos = -1;
int32_t a_extrude = -1;
// int32_t a_linesofar = -1;
std::array<float, 16> exmatrix = {{}};
int32_t u_exmatrix = -1;
std::array<float, 4> color = {{}};
int32_t u_color = -1;
std::array<float, 2> linewidth = {{}};
int32_t u_linewidth = -1;
float ratio = 0;
int32_t u_ratio = -1;
std::array<float, 2> dasharray = {{}};
int32_t u_dasharray = -1;
};
}
#endif