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

Method bindResources

src/backend/opengl/chart_impl.cpp:253–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251/********************* BEGIN-chart2d_impl *********************/
252
253void chart2d_impl::bindResources(const int pWindowId)
254{
255 CheckGL("Begin chart2d_impl::bindResources");
256 if (mVAOMap.find(pWindowId) == mVAOMap.end()) {
257 GLuint vao = 0;
258 /* create a vertex array object
259 * with appropriate bindings */
260 glGenVertexArrays(1, &vao);
261 glBindVertexArray(vao);
262 glEnableVertexAttribArray(mBorderAttribPointIndex);
263 glBindBuffer(GL_ARRAY_BUFFER, mDecorVBO);
264 glVertexAttribPointer(mBorderAttribPointIndex, 2, GL_FLOAT, GL_FALSE, 0, 0);
265 glBindVertexArray(0);
266 /* store the vertex array object corresponding to
267 * the window instance in the map */
268 mVAOMap[pWindowId] = vao;
269 }
270 glBindVertexArray(mVAOMap[pWindowId]);
271 CheckGL("End chart2d_impl::bindResources");
272}
273
274void chart2d_impl::unbindResources() const
275{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected