OpenGL GPU内存清理,需要吗? [英] OpenGL GPU Memory cleanup, required?

查看:365
本文介绍了OpenGL GPU内存清理,需要吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是否必须通过glDelete *函数手动清理所有DisplayList,纹理和(Geometry-)着色器等,还是在我的程序退出/崩溃时自动释放GPU内存?

Do I have to clean up all DisplayLists, Textures, (Geometry-)Shaders and so on by hand via the glDelete* functions, or does the GPU mem get freed automagically when my Program exits/crashes?

注意:GPU内存是指专用图形卡上的专用内存,而不是CPU内存.

Note: GPU mem refers to dedicated memory on a dedicated Graphics card, not CPU memory.

推荐答案

释放上下文,其他所有内容都是上下文本地的(除非您启用了显示列表共享),并且将随之消失.

Free the context, everything else is local to the context (unless you enabled display list sharing) and will go away along with it.

这篇关于OpenGL GPU内存清理,需要吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆