OpenSpace
OpenSpace copied to clipboard
TextureReader disallows multithreading
Issue by alexanderbock
Thursday May 05, 2016 at 21:35 GMT
Originally opened as https://github.com/OpenSpace/OpenSpace-Development/issues/48
When Loading a texture file using ghoul::io::TextureReader, OpenGL commands are being invoked. As OpenGL require its commands being serialized, this causes ghoul::io::TextureReader being unable to read textures in parallel using multi-threading. As a result from calling TextureReader::loadTexture(<path>) from a separate thread, the resulting ghoul::opengl::Texture will get a texture ID _id equal to zero, which is an invalid OpenGL texture ID.
Idea for improvement: In TextureReader, separate pure data loading from OpenGL interfacing
Related to the use of the class "RawTile" in globe browsing. If this issuse is solved, RawTile should probably not be used. It still needs the tile index and metadata but does not necessarily have to be separated from Tile. Could be investigated when working on this issue.