diff options
author | dec05eba <dec05eba@protonmail.com> | 2017-12-22 17:34:55 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-11-18 15:21:48 +0100 |
commit | b5f06b6c4cd07f3073897af32626b9b21a4d2ef8 (patch) | |
tree | 3ccfb3f7776730520ed28679652c8dec5c4c126d /src/RenderBackend/OpenGL/DeviceMemory.cpp | |
parent | bfd21732b35a3856b1f72c826816c2857710fcb3 (diff) |
Fix vertex and pixel shader
Remove pixel shader code from shader program
Diffstat (limited to 'src/RenderBackend/OpenGL/DeviceMemory.cpp')
-rw-r--r-- | src/RenderBackend/OpenGL/DeviceMemory.cpp | 11 |
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); } |