From 866e00474be3bfe0e7dac73b720af0b9ebf7109a Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 13 Apr 2019 20:15:07 +0800 Subject: *misc --- source/modules/asura-core/graphics/gpu_buffer.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source/modules/asura-core/graphics/gpu_buffer.cpp') diff --git a/source/modules/asura-core/graphics/gpu_buffer.cpp b/source/modules/asura-core/graphics/gpu_buffer.cpp index aecfa51..e16a4ac 100644 --- a/source/modules/asura-core/graphics/gpu_buffer.cpp +++ b/source/modules/asura-core/graphics/gpu_buffer.cpp @@ -138,5 +138,18 @@ namespace AsuraEngine } } + size_t GPUBuffer::GetDataTypeSize(GLenum datatype) + { + switch (datatype) + { + case GL_UNSIGNED_BYTE: + return sizeof(GLbyte); + case GL_FLOAT: + return sizeof(GLfloat); + case GL_INT: + return sizeof(GLint); + } + } + } } \ No newline at end of file -- cgit v1.1-26-g67d0