diff options
author | chai <chaifix@163.com> | 2019-08-01 09:15:04 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-01 09:15:04 +0800 |
commit | 99b90496765df21c5f377f42b9ed073ccb34c1fd (patch) | |
tree | 201cade18b6571d6ab5318945aed59a3610295a5 /source/modules/asura-core/graphics/gpu_buffer.cpp | |
parent | 084623519e95f0ab0cf4bc328b5fa736d679c5bd (diff) |
*misc
Diffstat (limited to 'source/modules/asura-core/graphics/gpu_buffer.cpp')
-rw-r--r-- | source/modules/asura-core/graphics/gpu_buffer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/modules/asura-core/graphics/gpu_buffer.cpp b/source/modules/asura-core/graphics/gpu_buffer.cpp index bf5ac6a..4271b70 100644 --- a/source/modules/asura-core/graphics/gpu_buffer.cpp +++ b/source/modules/asura-core/graphics/gpu_buffer.cpp @@ -69,16 +69,16 @@ bool GPUBuffer::Fill(const void * data, size_t size, uint offset) return false; if (m_Buffer == 0) { - gfx.WipeError(); + g_Device.WipeError(); glGenBuffers(1, &m_Buffer); if (m_Buffer == 0) throw Exception("OpenGL glGenBuffers failed."); glBindBuffer(m_Target, m_Buffer); glBufferData(m_Target, m_Size, NULL, m_Usage); - if (gfx.HasError()) + if (g_Device.HasError()) { glBindBuffer(m_Target, 0); - throw Exception("OpenGL glBufferData failed. Errorcode=%d.", gfx.GetError()); + throw Exception("OpenGL glBufferData failed. Errorcode=%d.", g_Device.GetError()); } #if ASURA_DEBUG m_Data = (byte*)malloc(size); @@ -88,10 +88,10 @@ bool GPUBuffer::Fill(const void * data, size_t size, uint offset) else glBindBuffer(m_Target, m_Buffer); glBufferSubData(m_Target, offset, size, data); - if (gfx.HasError()) + if (g_Device.HasError()) { glBindBuffer(m_Target, 0); - throw Exception("OpenGL glBufferSubData failed. Errorcode=%d.", gfx.GetError()); + throw Exception("OpenGL glBufferSubData failed. Errorcode=%d.", g_Device.GetError()); } glBindBuffer(m_Target, 0); #if ASURA_DEBUG |