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

Class vector_field_impl

src/backend/opengl/vector_field_impl.hpp:27–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25{
26
27class vector_field_impl : public AbstractRenderable {
28 protected:
29 gl::GLuint mDimension;
30 /* plot points characteristics */
31 gl::GLuint mNumPoints;
32 forge::dtype mDataType;
33 gl::GLenum mGLType;
34 /* OpenGL Objects */
35 ShaderProgram mFieldProgram;
36 gl::GLuint mDBO;
37 size_t mDBOSize;
38 /* shader variable index locations */
39 /* vertex shader */
40 gl::GLuint mFieldPointIndex;
41 gl::GLuint mFieldColorIndex;
42 gl::GLuint mFieldAlphaIndex;
43 gl::GLuint mFieldDirectionIndex;
44 /* geometry shader */
45 gl::GLuint mFieldPVMatIndex;
46 gl::GLuint mFieldModelMatIndex;
47 gl::GLuint mFieldAScaleMatIndex;
48 /* fragment shader */
49 gl::GLuint mFieldPVCOnIndex;
50 gl::GLuint mFieldPVAOnIndex;
51 gl::GLuint mFieldUColorIndex;
52
53 std::map<int, gl::GLuint> mVAOMap;
54
55 /* bind and unbind helper functions
56 * for rendering resources */
57 void bindResources(const int pWindowId);
58 void unbindResources() const;
59
60 virtual glm::mat4 computeModelMatrix(const glm::mat4& pOrient);
61
62 public:
63 vector_field_impl(const uint pNumPoints, const forge::dtype pDataType,
64 const int pDimension=3);
65 ~vector_field_impl();
66
67 gl::GLuint directions();
68 size_t directionsSize() const;
69
70 virtual void render(const int pWindowId,
71 const int pX, const int pY, const int pVPW, const int pVPH,
72 const glm::mat4 &pView, const glm::mat4 &pOrient);
73};
74
75class vector_field2d_impl : public vector_field_impl {
76 protected:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected