From 5eecb6a8377e1407c17f3e1355a0060249924903 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Wed, 25 Feb 2015 14:44:10 -0800 Subject: [PATCH] correctly delete glbuffers --- libraries/gpu/src/gpu/Context.h | 3 ++- libraries/gpu/src/gpu/GLBackend.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/gpu/src/gpu/Context.h b/libraries/gpu/src/gpu/Context.h index b8cba3ded1..78e58bf721 100644 --- a/libraries/gpu/src/gpu/Context.h +++ b/libraries/gpu/src/gpu/Context.h @@ -11,6 +11,7 @@ #ifndef hifi_gpu_Context_h #define hifi_gpu_Context_h +#include #include #include "Resource.h" @@ -21,7 +22,7 @@ namespace gpu { class GPUObject { public: GPUObject() {} - ~GPUObject() {} + virtual ~GPUObject() {} }; class Batch; diff --git a/libraries/gpu/src/gpu/GLBackend.h b/libraries/gpu/src/gpu/GLBackend.h index e3450ae71a..49d4bd4c19 100644 --- a/libraries/gpu/src/gpu/GLBackend.h +++ b/libraries/gpu/src/gpu/GLBackend.h @@ -32,7 +32,7 @@ public: static void checkGLError(); - class GLBuffer { + class GLBuffer : public GPUObject { public: Stamp _stamp; GLuint _buffer;