[DEV] some patch

This commit is contained in:
Edouard DUPIN 2016-04-24 16:27:43 +02:00
parent cd09d7ff98
commit b1ba2bd92e
2 changed files with 9 additions and 6 deletions

View File

@ -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<LOG_OGL_INTERNAL_BUFFER_LEN ; iii++) {
tmpLog[idOut] = l_bufferDisplayError[iii];
if ( tmpLog[idOut] == '\n'

View File

@ -12,9 +12,6 @@
#include <gale/resource/VirtualBufferObject.h>
#include <gale/renderer/openGL/openGL-include.h>
#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<std::recursive_mutex> 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<std::recursive_mutex> lock(m_mutex);
if (true == m_exist) {
if (m_exist == true) {
gale::openGL::deleteBuffers(m_vbo);
m_exist = false;
}