mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Separate Renderable::initialize into initialize and initializeGL functions
Handle initialize in a separate thread and display rudimentary loading screen
This commit is contained in:
@@ -190,7 +190,7 @@ bool RenderableDebugPlane::isReady() const {
|
||||
return ready;
|
||||
}
|
||||
|
||||
void RenderableDebugPlane::initialize() {
|
||||
void RenderableDebugPlane::initializeGL() {
|
||||
glGenVertexArrays(1, &_quad); // generate array
|
||||
glGenBuffers(1, &_vertexPositionBuffer); // generate buffer
|
||||
createPlane();
|
||||
@@ -204,7 +204,7 @@ void RenderableDebugPlane::initialize() {
|
||||
}
|
||||
}
|
||||
|
||||
void RenderableDebugPlane::deinitialize() {
|
||||
void RenderableDebugPlane::deinitializeGL() {
|
||||
glDeleteVertexArrays(1, &_quad);
|
||||
_quad = 0;
|
||||
|
||||
|
||||
@@ -49,8 +49,8 @@ public:
|
||||
RenderableDebugPlane(const ghoul::Dictionary& dictionary);
|
||||
~RenderableDebugPlane();
|
||||
|
||||
void initialize() override;
|
||||
void deinitialize() override;
|
||||
void initializeGL() override;
|
||||
void deinitializeGL() override;
|
||||
|
||||
bool isReady() const override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user