diff -r 121a40d5e34c -r 8e1c9f18ae15 src/gl/vertexprogram.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gl/vertexprogram.h Tue Jul 27 16:29:00 2021 +0300 @@ -0,0 +1,29 @@ +#ifndef VERTEXPROGRAM_H +#define VERTEXPROGRAM_H +#include "basicshaderprogram.h" +class Document; + +class VertexProgram : public AbstractBasicShaderProgram +{ +public: + struct Vertex + { + glm::vec3 position; + glm::vec3 color; + }; + VertexProgram(QObject* parent = nullptr); + void build(const Document* document); +protected: + const char* vertexShaderSource() const override; + const char* fragmentShaderSource() const override; + const void* vertexData() const override; + int vertexSize() const override; + int vertexCount() const override; + void setupVertexArrays() override; + GLenum drawMode() const override; + QOpenGLBuffer::UsagePattern usagePattern() const override; +private: + std::vector data; +}; + +#endif // VERTEXPROGRAM_H