From 8ee3f7453bf7b0db5c7358e697e91714d825c87d Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 9 Jun 2019 21:12:25 +0800 Subject: *misc --- source/modules/asura-core/graphics/gpu_buffer.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (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 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; -- cgit v1.1-26-g67d0