fix shadowmap crash on some Intel GPUs, see https://github.com/bulletphysics/bullet3/issues/4

remove targetdir from all libraries in premake, so it is much easier to create a separate folder for all binary+lib
transmit the serialized btMultiBody data back from server to client, after the server loads a URDF file. This includes base+link+joint names
tweak the serialization routines, so it is easier to skip pointers and to serialize directly to a shared memory buffer
also tweak the serialization code to allow to process data without 'DNA' schema data (assuming file-DNA = memory DNA)
This commit is contained in:
erwincoumans
2015-07-10 22:20:06 -07:00
parent f6f76901fd
commit 6c9ce344ea
35 changed files with 340 additions and 120 deletions

View File

@@ -1325,7 +1325,33 @@ void GLInstancingRenderer::renderSceneInternal(int renderMode)
glBindTexture(GL_TEXTURE_2D,m_data->m_shadowTexture);
//glTexImage2D(GL_TEXTURE_2D,0,GL_DEPTH_COMPONENT16,m_screenWidth,m_screenHeight,0,GL_DEPTH_COMPONENT,GL_FLOAT,0);
//glTexImage2D(GL_TEXTURE_2D,0,GL_DEPTH_COMPONENT32,m_screenWidth,m_screenHeight,0,GL_DEPTH_COMPONENT,GL_FLOAT,0);
#ifdef OLD_SHADOWMAP_INIT
glTexImage2D(GL_TEXTURE_2D, 0,GL_DEPTH_COMPONENT16, shadowMapWidth, shadowMapHeight, 0,GL_DEPTH_COMPONENT, GL_FLOAT, 0);
#else//OLD_SHADOWMAP_INIT
//Reduce size of shadowMap if glTexImage2D call fails as may happen in some cases
//https://github.com/bulletphysics/bullet3/issues/40
int size;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size);
if (size < shadowMapWidth){
shadowMapWidth = size;
}
if (size < shadowMapHeight){
shadowMapHeight = size;
}
GLuint err;
do {
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16,
shadowMapWidth, shadowMapHeight,
0, GL_DEPTH_COMPONENT, GL_FLOAT, 0);
err = glGetError();
if (err!=GL_NO_ERROR){
shadowMapHeight >>= 1;
shadowMapWidth >>= 1;
}
} while (err != GL_NO_ERROR && shadowMapWidth > 0);
#endif//OLD_SHADOWMAP_INIT
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);