aboutsummaryrefslogtreecommitdiff
path: root/src/RenderBackend/OpenGL/DeviceMemory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/RenderBackend/OpenGL/DeviceMemory.cpp')
-rw-r--r--src/RenderBackend/OpenGL/DeviceMemory.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/RenderBackend/OpenGL/DeviceMemory.cpp b/src/RenderBackend/OpenGL/DeviceMemory.cpp
index f166666..9e33ac9 100644
--- a/src/RenderBackend/OpenGL/DeviceMemory.cpp
+++ b/src/RenderBackend/OpenGL/DeviceMemory.cpp
@@ -8,17 +8,22 @@ namespace amalgine
glGenBuffers(1, &vertexBufferObjectId);
}
- void DeviceMemory::copyStatic(const DataView<f32> &data)
+ DeviceMemory::~DeviceMemory()
+ {
+ glDeleteBuffers(1, &vertexBufferObjectId);
+ }
+
+ void DeviceMemory::copyAsStatic(const DataView<f32> &data)
{
copy(data, GL_STATIC_DRAW);
}
- void DeviceMemory::copyDynamic(const DataView<f32> &data)
+ void DeviceMemory::copyAsDynamic(const DataView<f32> &data)
{
copy(data, GL_DYNAMIC_DRAW);
}
- void DeviceMemory::copyStream(const DataView<f32> &data)
+ void DeviceMemory::copyAsStream(const DataView<f32> &data)
{
copy(data, GL_STREAM_DRAW);
}