From f57e2e048fbbea265c513769879e39c27b2b9c8e Mon Sep 17 00:00:00 2001 From: Andreas Grois Date: Sat, 10 Mar 2018 16:25:46 +0100 Subject: Remove non-needed host buffer copy to ssbo, instead initialize ssbo with zero. --- BuddhaTest/src/BuddhaTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'BuddhaTest') diff --git a/BuddhaTest/src/BuddhaTest.cpp b/BuddhaTest/src/BuddhaTest.cpp index 74bdc80..0df3421 100644 --- a/BuddhaTest/src/BuddhaTest.cpp +++ b/BuddhaTest/src/BuddhaTest.cpp @@ -120,8 +120,8 @@ int main() glGenBuffers(1, &drawBuffer); glBindBuffer(GL_SHADER_STORAGE_BUFFER, drawBuffer); { - std::vector initializeBuffer(pixelCount,0); - glBufferData(GL_SHADER_STORAGE_BUFFER, 4 * pixelCount, initializeBuffer.data(), GL_DYNAMIC_COPY); + glBufferData(GL_SHADER_STORAGE_BUFFER, 4 * pixelCount, nullptr, GL_DYNAMIC_COPY); + glClearBufferData(GL_SHADER_STORAGE_BUFFER,GL_R8,GL_RED,GL_UNSIGNED_INT,nullptr); } glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 2, drawBuffer); glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0); -- cgit v1.2.3