From 99b90496765df21c5f377f42b9ed073ccb34c1fd Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 1 Aug 2019 09:15:04 +0800 Subject: *misc --- source/modules/asura-core/graphics/gpu_buffer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 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 -- cgit v1.1-26-g67d0