aboutsummaryrefslogtreecommitdiff
path: root/src/buffer.cc
diff options
context:
space:
mode:
authordan sinclair <dj2@everburning.com>2018-11-19 16:47:15 -0500
committerGitHub <noreply@github.com>2018-11-19 16:47:15 -0500
commit6296cc53f4608ee06fff0d57a6b266c541f0ca7a (patch)
tree91965332253d17eadc446857dd99794969cb32eb /src/buffer.cc
parent016ef655f42c3d475d592150d759983beb2731ad (diff)
downloadamber-6296cc53f4608ee06fff0d57a6b266c541f0ca7a.tar.gz
Make the Buffer code common (#67)
This CL moves the AmberScript Buffer to be shared with VkScript. The Indices data is moved to be stored in a Buffer and passed as needed.
Diffstat (limited to 'src/buffer.cc')
-rw-r--r--src/buffer.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/buffer.cc b/src/buffer.cc
new file mode 100644
index 0000000..08e3ddd
--- /dev/null
+++ b/src/buffer.cc
@@ -0,0 +1,23 @@
+// Copyright 2018 The Amber Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "src/buffer.h"
+
+namespace amber {
+
+Buffer::Buffer(BufferType type) : buffer_type_(type) {}
+
+Buffer::~Buffer() = default;
+
+} // namespace amber