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

Method renderGraph

src/backend/opengl/surface_impl.cpp:119–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void surface_impl::renderGraph(const int pWindowId, const glm::mat4& transform)
120{
121 CheckGL("Begin surface_impl::renderGraph");
122
123 mSurfProgram.bind();
124
125 glUniformMatrix4fv(mSurfMatIndex, 1, GL_FALSE, glm::value_ptr(transform));
126 glUniform2fv(mSurfRangeIndex, 3, mRange);
127 glUniform1i(mSurfPVCIndex, mIsPVCOn);
128 glUniform1i(mSurfPVAIndex, mIsPVAOn);
129
130 bindResources(pWindowId);
131 glDrawElements(GL_TRIANGLE_STRIP, gl::GLsizei(mIBOSize), GL_UNSIGNED_INT, (void*)0);
132 unbindResources();
133 mSurfProgram.unbind();
134
135 if (mMarkerType != FG_MARKER_NONE) {
136 glEnable(GL_PROGRAM_POINT_SIZE);
137 mMarkerProgram.bind();
138
139 glUniformMatrix4fv(mMarkerMatIndex, 1, GL_FALSE, glm::value_ptr(transform));
140 glUniform1i(mMarkerPVCIndex, mIsPVCOn);
141 glUniform1i(mMarkerPVAIndex, mIsPVAOn);
142 glUniform1i(mMarkerTypeIndex, mMarkerType);
143 glUniform4fv(mMarkerColIndex, 1, mColor);
144
145 bindResources(pWindowId);
146 glDrawElements(GL_POINTS, gl::GLsizei(mIBOSize), GL_UNSIGNED_INT, (void*)0);
147 unbindResources();
148
149 mMarkerProgram.unbind();
150 glDisable(GL_PROGRAM_POINT_SIZE);
151 }
152 CheckGL("End surface_impl::renderGraph");
153}
154
155
156surface_impl::surface_impl(unsigned pNumXPoints, unsigned pNumYPoints,

Callers

nothing calls this directly

Calls 2

bindMethod · 0.80
unbindMethod · 0.80

Tested by

no test coverage detected