
struct PointRendererProgram
{
    GLuint programId;

    GLuint projMatrixLocation;
    GLuint pointSizeLocation;
    GLuint transparencyLocation;
};

// Renders points.
class PointRenderer
{
    static PointRendererProgram glslProgram;

    GLuint vao;
    std::size_t lastBufferSize;

public:
    static bool LoadProgram(ShaderFactory* shaderFactory);

    PositionVbo positionBuffer;
    ColorVbo colorBuffer;

    PointRenderer();

    // Updates the GPU with whatever is currently in the point buffers.
    void Update();

    // Renders the points in the provided buffers.
    void Render(glm::mat4& projectionMatrix);

    // Helper methods for dealing with points.
    void Clear();


    ~PointRenderer();
};

