c++ - glGenLists(1) 在 OnPaint() 外用 wxThread 返回 0

标签 c++ opengl wxwidgets

目前,我正在尝试将显示列表与 OnPaint() 分开,但 glGenLists(1) 返回 0。

使用显示列表有什么前提吗?
函数 glGenLists(1) 是否仅在 OnXxx() 事件线程中存在?

谢谢!

最佳答案

唯一的要求是拥有一个有效的 OpenGL 上下文。你可能没有。如果您使用多线程,则需要使用共享对象的多个 GL 上下文。

关于c++ - glGenLists(1) 在 OnPaint() 外用 wxThread 返回 0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4020391/

相关文章:

c++ - 使用c++集的贪心算法错误

c++ - ERR : Constexpr variable must be initialized by a constant expression, 但它是

c++ - 有人可以解释这个 OpenGL 代码吗?

opengl - OpenGL 中的照明问题

c++ - 检索现有着色器属性时,glGetAttribLocation 返回 -1

python - wxPython StyledTextCtrl 设置(部分)文本颜色

c++ - 对常规文件进行 Epoll

python - 从消息对话框中删除蜂鸣声

c++ - Xcode 4.2 创建 xcode 示例项目

c++ - 如何检查函数参数的类型?