| 251 | /********************* BEGIN-chart2d_impl *********************/ |
| 252 | |
| 253 | void 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 | |
| 274 | void chart2d_impl::unbindResources() const |
| 275 | { |
nothing calls this directly
no outgoing calls
no test coverage detected