View Full Version : thread resource loading
06-28-2010, 05:05 PM
I just wanted to make a VBO within a thread my main thread spawns and got a nice segfault for it. I'd like to know what resources I can load in a spawned thread and share with the main thread.
I'd like the main thread show a splah screen or a GUI, while I load resources (textures/geometry...) from the spawned thread.
06-29-2010, 07:39 AM
Your main thread and the loading thread each need an OpenGL context that are shared. Most "big" GL resources (VBOs, textures, shaders) can be created on the loader thread then used in the main thread but "small" container objects like VAOs, FBOs, and occlusion queries cannot. See the spec (http://www.opengl.org/registry/) for full details on what is shared between contexts.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.