MCPcopy Create free account
hub / github.com/arrayfire/forge / plot_impl

Class plot_impl

src/backend/opengl/plot_impl.hpp:27–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25{
26
27class plot_impl : public AbstractRenderable {
28 protected:
29 gl::GLuint mDimension;
30 gl::GLfloat mMarkerSize;
31 /* plot points characteristics */
32 gl::GLuint mNumPoints;
33 forge::dtype mDataType;
34 gl::GLenum mGLType;
35 forge::MarkerType mMarkerType;
36 forge::PlotType mPlotType;
37 bool mIsPVROn;
38 /* OpenGL Objects */
39 ShaderProgram mPlotProgram;
40 ShaderProgram mMarkerProgram;
41 gl::GLuint mRBO;
42 size_t mRBOSize;
43 /* shader variable index locations */
44 gl::GLuint mPlotMatIndex;
45 gl::GLuint mPlotPVCOnIndex;
46 gl::GLuint mPlotPVAOnIndex;
47 gl::GLuint mPlotUColorIndex;
48 gl::GLuint mPlotRangeIndex;
49 gl::GLuint mPlotPointIndex;
50 gl::GLuint mPlotColorIndex;
51 gl::GLuint mPlotAlphaIndex;
52
53 gl::GLuint mMarkerPVCOnIndex;
54 gl::GLuint mMarkerPVAOnIndex;
55 gl::GLuint mMarkerPVROnIndex;
56 gl::GLuint mMarkerTypeIndex;
57 gl::GLuint mMarkerColIndex;
58 gl::GLuint mMarkerMatIndex;
59 gl::GLuint mMarkerPSizeIndex;
60 gl::GLuint mMarkerPointIndex;
61 gl::GLuint mMarkerColorIndex;
62 gl::GLuint mMarkerAlphaIndex;
63 gl::GLuint mMarkerRadiiIndex;
64
65 std::map<int, gl::GLuint> mVAOMap;
66
67 /* bind and unbind helper functions
68 * for rendering resources */
69 void bindResources(const int pWindowId);
70 void unbindResources() const;
71
72 virtual glm::mat4 computeTransformMat(const glm::mat4 pView, const glm::mat4 pOrient);
73
74 virtual void bindDimSpecificUniforms(); // has to be called only after shaders are bound
75
76 public:
77 plot_impl(const uint pNumPoints, const forge::dtype pDataType,
78 const forge::PlotType pPlotType, const forge::MarkerType pMarkerType,
79 const int pDimension=3);
80 ~plot_impl();
81
82 void setMarkerSize(const float pMarkerSize);
83
84 uint markers();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected