Issue/525 (#593)

* Add initializeGL and deinitializeGL methods to OpenSpaceModule Call releaseAll from ProgramObjectManager in deinitializeGL to guard against errors when deinitializing assets

* Change removeProgramObject function in RenderEngine to take a non-owning pointer instead of a reference to a unique pointer to make it compatible with the ProgramObjectManager
Update Ghoul repository

* Using ProgramObjectManager in more modules to reduce the number of programs compiled at startup
This commit is contained in:
Alexander Bock
2018-04-10 15:55:52 -04:00
committed by GitHub
parent 34987e9f85
commit 40dbf875c5
55 changed files with 621 additions and 332 deletions
+10
View File
@@ -61,12 +61,22 @@ public:
*/
void initialize(const ghoul::Dictionary& moduleConfigurations);
/**
* Calls the initializeGL functions of all registered OpenSpaceModule%s.
*/
void initializeGL();
/**
* Deinitializes all of the contained OpenSpaceModule%s by calling the
* OpenSpaceModule::deinitialize methods.
*/
void deinitialize();
/**
* Calls the deinitializeGL functions of all registered OpenSpaceModule%s.
*/
void deinitializeGL();
/**
* Registers the passed \p module with this ModuleEngine. The OpenSpaceModule::create
* method will be called on the \p module in the process.
+1 -2
View File
@@ -120,8 +120,7 @@ public:
std::string csPath,
const ghoul::Dictionary& dictionary = ghoul::Dictionary());
void removeRenderProgram(
const std::unique_ptr<ghoul::opengl::ProgramObject>& program);
void removeRenderProgram(ghoul::opengl::ProgramObject* program);
/**
* Set raycasting uniforms on the program object, and setup raycasting.
+26 -1
View File
@@ -66,7 +66,13 @@ public:
* internalInitialize method for further customization for each subclass.
*/
void initialize(const ModuleEngine* moduleEngine,
const ghoul::Dictionary& configuration);
const ghoul::Dictionary& configuration);
/**
* This method calls the internalInitializeGL method for further customization for
* each subclass.
*/
void initializeGL();
/**
* Empty deinitialization method that will call the internalDeinitialize method for
@@ -74,6 +80,11 @@ public:
*/
void deinitialize();
/**
* This method will call the internalDeinitializeGL method for each subclass.
*/
void deinitializeGL();
/**
* Returns a list of Documentation classes that are valid for this OpenSpaceModule.
* \return A list of Documentation classes that are valid for this OpenSapceModule
@@ -112,12 +123,26 @@ protected:
*/
virtual void internalInitialize(const ghoul::Dictionary& configuration);
/**
* Customization point for each derived class. The internalInitializeGL method is
* called by the initializeGL method at a time when a valid OpenGL state is
* guaranteed.
*/
virtual void internalInitializeGL();
/**
* Customization point for each derived class. The internalDeinitialize method is
* called by the deinitialize method.
*/
virtual void internalDeinitialize();
/**
* Customization point for each derived class. The internalDeinitializeGL method is
* called by the deinitializeGL method at a time when a valid OpenGL state is
* guaranteed.
*/
virtual void internalDeinitializeGL();
/**
* Returns the path for this module, possibly containing ghoul::filesystem::FileSystem
* path tokens.