mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-18 05:11:43 +02:00
avoid calling a pure virtual function from GLBackend dtor
This commit is contained in:
parent
186035dc5d
commit
6f9460162d
4 changed files with 11 additions and 3 deletions
|
@ -196,8 +196,6 @@ GLBackend::GLBackend() {
|
|||
|
||||
|
||||
GLBackend::~GLBackend() {
|
||||
resetStages();
|
||||
|
||||
killInput();
|
||||
killTransform();
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ protected:
|
|||
public:
|
||||
static bool makeProgram(Shader& shader, const Shader::BindingSet& slotBindings = Shader::BindingSet());
|
||||
|
||||
~GLBackend();
|
||||
virtual ~GLBackend();
|
||||
|
||||
void setCameraCorrection(const Mat4& correction);
|
||||
void render(const Batch& batch) final override;
|
||||
|
|
|
@ -43,6 +43,11 @@ public:
|
|||
|
||||
explicit GL41Backend(bool syncCache) : Parent(syncCache) {}
|
||||
GL41Backend() : Parent() {}
|
||||
virtual ~GL41Backend() {
|
||||
// call resetStages here rather than in ~GLBackend dtor because it will call releaseResourceBuffer
|
||||
// which is pure virtual from GLBackend's dtor.
|
||||
resetStages();
|
||||
}
|
||||
|
||||
static const std::string GL41_VERSION;
|
||||
const std::string& getVersion() const override { return GL41_VERSION; }
|
||||
|
|
|
@ -39,6 +39,11 @@ public:
|
|||
|
||||
explicit GL45Backend(bool syncCache) : Parent(syncCache) {}
|
||||
GL45Backend() : Parent() {}
|
||||
virtual ~GL45Backend() {
|
||||
// call resetStages here rather than in ~GLBackend dtor because it will call releaseResourceBuffer
|
||||
// which is pure virtual from GLBackend's dtor.
|
||||
resetStages();
|
||||
}
|
||||
|
||||
static const std::string GL45_VERSION;
|
||||
const std::string& getVersion() const override { return GL45_VERSION; }
|
||||
|
|
Loading…
Reference in a new issue