gearvr crash fix and mip level fix for gearvr swapchain

This commit is contained in:
Jimmy Lee
2018-01-22 20:03:55 +00:00
committed by Baldur Karlsson
parent f46aa2944d
commit 579386dddb
2 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -1472,7 +1472,7 @@ void WrappedOpenGL::CreateVRAPITextureSwapChain(GLuint tex, GLenum textureType,
}
gl_CurChunk = GLChunk::glTexParameteri;
Common_glTextureParameteriEXT(record, textureType, eGL_TEXTURE_MAX_LEVEL, levels);
Common_glTextureParameteriEXT(record, textureType, eGL_TEXTURE_MAX_LEVEL, levels - 1);
}
else
{
+2 -4
View File
@@ -189,8 +189,6 @@ __attribute__((visibility("default"))) ovrTextureSwapChain *vrapi_CreateTextureS
vrapi_hooks.SetupHooks();
}
gl_CurChunk = GLChunk::vrapi_CreateTextureSwapChain2;
ovrTextureSwapChain *texture_swapchain = vrapi_hooks.vrapi_CreateTextureSwapChain2_real(
type, format, width, height, levels, bufferCount);
@@ -206,6 +204,7 @@ __attribute__((visibility("default"))) ovrTextureSwapChain *vrapi_CreateTextureS
GLenum internalformat = GetInternalFormat(format);
GLenum textureType = GetTextureType(type);
gl_CurChunk = GLChunk::vrapi_CreateTextureSwapChain2;
m_GLDriver->CreateVRAPITextureSwapChain(tex, textureType, internalformat, width, height,
levels);
}
@@ -224,8 +223,6 @@ __attribute__((visibility("default"))) ovrTextureSwapChain *vrapi_CreateTextureS
vrapi_hooks.SetupHooks();
}
gl_CurChunk = GLChunk::vrapi_CreateTextureSwapChain;
ovrTextureSwapChain *texture_swapchain =
vrapi_hooks.vrapi_CreateTextureSwapChain_real(type, format, width, height, levels, buffered);
@@ -241,6 +238,7 @@ __attribute__((visibility("default"))) ovrTextureSwapChain *vrapi_CreateTextureS
GLenum internalformat = GetInternalFormat(format);
GLenum textureType = GetTextureType(type);
gl_CurChunk = GLChunk::vrapi_CreateTextureSwapChain;
m_GLDriver->CreateVRAPITextureSwapChain(tex, textureType, internalformat, width, height,
levels);
}