PCB Environment 2
Loading...
Searching...
No Matches
RoutePainterLines.hpp
1
2#ifndef GYM_PCB_UI_ROUTEPAINTERLINES_H
3#define GYM_PCB_UI_ROUTEPAINTERLINES_H
4
5#include "GLContext.hpp"
6
7class Connection;
8class PCBoard;
9class Camera;
10
11class RoutePainterLines
12{
13public:
14 RoutePainterLines(const PCBoard&);
15 ~RoutePainterLines();
16 void update(const std::vector<Connection *>&);
17 void setLineWidth(float w) { mBaseLineWidth = w; }
18 void draw(const Camera&);
19private:
20 const PCBoard &mPCB;
21 uint mNumLineStrips{0};
22 uint mVertexCountEstimate{64};
23 float mBaseLineWidth{2.0f};
24 float mColorVars[2][4];
25
26 GLuint mVBO{0};
27 GLuint mCMD{0};
28 GLuint mVAO{0};
29
30 static GLuint sVP, sFP, sPP;
31 static GLint sUniformColors;
32
33 void createVAO();
34 static void createShaders();
35
36 static constexpr const GLushort RestartIndex = 0xffff;
37 static constexpr const bool UseLineStrips = false;
38};
39
40#endif // GYM_PCB_UI_ROUTEPAINTERLINES_H
Definition Camera.hpp:15
Definition Connection.hpp:17
Definition PCBoard.hpp:36