[DEV] some patch
This commit is contained in:
parent
cd09d7ff98
commit
b1ba2bd92e
@ -551,6 +551,10 @@ void gale::openGL::activeTexture(uint32_t _flagID) {
|
|||||||
#ifdef GALE_SIMULATION_OPENGL_AVAILLABLE
|
#ifdef GALE_SIMULATION_OPENGL_AVAILLABLE
|
||||||
}
|
}
|
||||||
#endif
|
#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);
|
glGetProgramInfoLog(GLuint(_prog), LOG_OGL_INTERNAL_BUFFER_LEN, &bufLength, l_bufferDisplayError);
|
||||||
char tmpLog[256];
|
char tmpLog[256];
|
||||||
int32_t idOut=0;
|
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++) {
|
for (size_t iii=0; iii<LOG_OGL_INTERNAL_BUFFER_LEN ; iii++) {
|
||||||
tmpLog[idOut] = l_bufferDisplayError[iii];
|
tmpLog[idOut] = l_bufferDisplayError[iii];
|
||||||
if ( tmpLog[idOut] == '\n'
|
if ( tmpLog[idOut] == '\n'
|
||||||
|
@ -12,9 +12,6 @@
|
|||||||
#include <gale/resource/VirtualBufferObject.h>
|
#include <gale/resource/VirtualBufferObject.h>
|
||||||
#include <gale/renderer/openGL/openGL-include.h>
|
#include <gale/renderer/openGL/openGL-include.h>
|
||||||
|
|
||||||
#undef __class__
|
|
||||||
#define __class__ "resource::VirtualBufferObject"
|
|
||||||
|
|
||||||
void gale::resource::VirtualBufferObject::init(int32_t _number) {
|
void gale::resource::VirtualBufferObject::init(int32_t _number) {
|
||||||
gale::Resource::init();
|
gale::Resource::init();
|
||||||
m_vbo.resize(_number, 0);
|
m_vbo.resize(_number, 0);
|
||||||
@ -39,6 +36,7 @@ void gale::resource::VirtualBufferObject::retreiveData() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool gale::resource::VirtualBufferObject::updateContext() {
|
bool gale::resource::VirtualBufferObject::updateContext() {
|
||||||
|
GALE_ERROR(" Start");
|
||||||
std::unique_lock<std::recursive_mutex> lock(m_mutex, std::defer_lock);
|
std::unique_lock<std::recursive_mutex> lock(m_mutex, std::defer_lock);
|
||||||
if (lock.try_lock() == false) {
|
if (lock.try_lock() == false) {
|
||||||
//Lock error ==> try later ...
|
//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::openGL::unbindBuffer();
|
||||||
|
GALE_ERROR(" Stop");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gale::resource::VirtualBufferObject::removeContext() {
|
void gale::resource::VirtualBufferObject::removeContext() {
|
||||||
std::unique_lock<std::recursive_mutex> lock(m_mutex);
|
std::unique_lock<std::recursive_mutex> lock(m_mutex);
|
||||||
if (true == m_exist) {
|
if (m_exist == true) {
|
||||||
gale::openGL::deleteBuffers(m_vbo);
|
gale::openGL::deleteBuffers(m_vbo);
|
||||||
m_exist = false;
|
m_exist = false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user