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

Method destroyGLResources

src/backend/opengl/font_impl.cpp:230–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230void font_impl::destroyGLResources()
231{
232 for (auto it = mVAOMap.begin(); it!=mVAOMap.end(); ++it) {
233 GLuint vao = it->second;
234 glDeleteVertexArrays(1, &vao);
235 }
236 mVAOMap.clear();
237
238 if (mVBO)
239 glDeleteBuffers(1, &mVBO);
240 /* remove all glyph structures from heap */
241 for (auto it: mGlyphLists) {
242 /* for each font size glyph list */
243 for (auto& m : it) {
244 delete m; /* delete Glyph structure */
245 }
246 it.clear();
247 }
248 /* clear list */
249 mGlyphLists.clear();
250}
251
252font_impl::font_impl()
253 : mTTFfile(""), mIsFontLoaded(false), mAtlas(new FontAtlas(512, 512, 1)), mVBO(0),

Callers

nothing calls this directly

Calls 1

clearMethod · 0.80

Tested by

no test coverage detected