diff options
author | Andreas Grois <andi@grois.info> | 2018-03-10 16:25:46 +0100 |
---|---|---|
committer | Andreas Grois <andi@grois.info> | 2018-03-10 16:25:46 +0100 |
commit | f57e2e048fbbea265c513769879e39c27b2b9c8e (patch) | |
tree | 8d2517c0b9fc0a03565081008a74cce45dd6d461 /BuddhaTest | |
parent | bff9c8b80ac858a271cdff3da7daeb2b43fc75bc (diff) |
Remove non-needed host buffer copy to ssbo, instead initialize ssbo with
zero.
Diffstat (limited to 'BuddhaTest')
-rw-r--r-- | BuddhaTest/src/BuddhaTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<uint32_t> 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);
|