summaryrefslogtreecommitdiff
path: root/source/modules/asura-core/graphics/gpu_buffer.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-04-08 22:31:12 +0800
committerchai <chaifix@163.com>2019-04-08 22:31:12 +0800
commit4ea4bbfcb03091cb987dc151d41980ec16f3d18d (patch)
treebdbe56d8c570b5f243744fbfc5a6cdd2c4f6dc4f /source/modules/asura-core/graphics/gpu_buffer.h
parente47baca4f23db43ec91fbf64d5d06d7c0dbee495 (diff)
*misc
Diffstat (limited to 'source/modules/asura-core/graphics/gpu_buffer.h')
-rw-r--r--source/modules/asura-core/graphics/gpu_buffer.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/source/modules/asura-core/graphics/gpu_buffer.h b/source/modules/asura-core/graphics/gpu_buffer.h
index aba1157..c79ed4b 100644
--- a/source/modules/asura-core/graphics/gpu_buffer.h
+++ b/source/modules/asura-core/graphics/gpu_buffer.h
@@ -1,6 +1,7 @@
#ifndef __ASURA_GPU_BUFFER_H__
#define __ASURA_GPU_BUFFER_H__
+#include <asura-utils/scripting/portable.hpp>
#include <asura-utils/exceptions/exception.h>
#include <asura-utils/type.h>
@@ -27,11 +28,12 @@ namespace AsuraEngine
///
/// GPU壬ֶ㻺֣ÿζڴԴϴݡ
///
- class GPUBuffer
+ class GPUBuffer
+ : AEScripting::Portable<GPUBuffer>
{
public:
- GPUBuffer(BufferType type, BufferUsage usage, size_t size) ASURA_THROW(Exception);
+ GPUBuffer(BufferType type, BufferUsage usage, size_t size);
~GPUBuffer();
///
@@ -47,7 +49,20 @@ namespace AsuraEngine
uint GetBufferSize();
- private:
+ private:
+
+ //----------------------------------------------------------------------------//
+
+ LUAX_DECL_FACTORY(GPUBuffer);
+
+ LUAX_DECL_ENUM(BufferType, 1);
+ LUAX_DECL_ENUM(BufferUsage, 1);
+
+ LUAX_DECL_METHOD(_New);
+ LUAX_DECL_METHOD(_Fill);
+ LUAX_DECL_METHOD(_GetSize);
+
+ //----------------------------------------------------------------------------//
GLenum mTarget;
GLuint mBuffer;