diff options
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 |