summaryrefslogtreecommitdiff
path: root/source/modules/asura-core/graphics/gpu_buffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/modules/asura-core/graphics/gpu_buffer.cpp')
-rw-r--r--source/modules/asura-core/graphics/gpu_buffer.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/modules/asura-core/graphics/gpu_buffer.cpp b/source/modules/asura-core/graphics/gpu_buffer.cpp
index 4c84b7e..8d6f491 100644
--- a/source/modules/asura-core/graphics/gpu_buffer.cpp
+++ b/source/modules/asura-core/graphics/gpu_buffer.cpp
@@ -71,13 +71,12 @@ namespace AsuraEngine
return false;
if (mBuffer == 0)
{
- // ʼ
gfx.WipeError();
glGenBuffers(1, &mBuffer);
if (mBuffer == 0)
throw Exception("OpenGL glGenBuffers failed.");
glBindBuffer(mTarget, mBuffer);
- glBufferData(mTarget, mSize, NULL, mUsage); // ʼСΪsizeĻ壬usageŵӦԴ
+ glBufferData(mTarget, mSize, NULL, mUsage);
if (gfx.HasError())
{
glBindBuffer(mTarget, 0);
@@ -98,7 +97,6 @@ namespace AsuraEngine
}
glBindBuffer(mTarget, 0);
#if ASURA_DEBUG
- // һݣ
memcpy(mData + offset, data, size);
#endif
return true;