From b1ba2bd92eab0465b021d68743fb659791a6c48a Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Sun, 24 Apr 2016 16:27:43 +0200 Subject: [PATCH] [DEV] some patch --- gale/renderer/openGL/openGL.cpp | 6 +++++- gale/resource/VirtualBufferObject.cpp | 9 ++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/gale/renderer/openGL/openGL.cpp b/gale/renderer/openGL/openGL.cpp index 125dc64..0209582 100644 --- a/gale/renderer/openGL/openGL.cpp +++ b/gale/renderer/openGL/openGL.cpp @@ -551,6 +551,10 @@ void gale::openGL::activeTexture(uint32_t _flagID) { #ifdef GALE_SIMULATION_OPENGL_AVAILLABLE } #endif + } else { + #if DEBUG + GALE_ERROR("try to bind texture with no program set"); + #endif } } @@ -927,7 +931,7 @@ bool gale::openGL::program::compile(int64_t _prog) { glGetProgramInfoLog(GLuint(_prog), LOG_OGL_INTERNAL_BUFFER_LEN, &bufLength, l_bufferDisplayError); char tmpLog[256]; int32_t idOut=0; - GALE_ERROR("Could not compile \"PROGRAM\":"); + GALE_ERROR("Could not compile 'PROGRAM':"); for (size_t iii=0; iii #include -#undef __class__ -#define __class__ "resource::VirtualBufferObject" - void gale::resource::VirtualBufferObject::init(int32_t _number) { gale::Resource::init(); m_vbo.resize(_number, 0); @@ -39,6 +36,7 @@ void gale::resource::VirtualBufferObject::retreiveData() { } bool gale::resource::VirtualBufferObject::updateContext() { + GALE_ERROR(" Start"); std::unique_lock lock(m_mutex, std::defer_lock); if (lock.try_lock() == false) { //Lock error ==> try later ... @@ -59,14 +57,15 @@ bool gale::resource::VirtualBufferObject::updateContext() { } } } - // un-bind it to permet to have no erreor in the next display ... + // un-bind it to permet to have no error in the next display ... gale::openGL::unbindBuffer(); + GALE_ERROR(" Stop"); return true; } void gale::resource::VirtualBufferObject::removeContext() { std::unique_lock lock(m_mutex); - if (true == m_exist) { + if (m_exist == true) { gale::openGL::deleteBuffers(m_vbo); m_exist = false; }