1
0
Fork 0

Merge pull request #8394 from eska014/fbo-depth-format

Fix FBO depth texture format
This commit is contained in:
Andreas Haas 2017-04-15 15:52:26 +02:00 committed by GitHub
commit e55a496f79
1 changed files with 2 additions and 2 deletions

View File

@ -5534,7 +5534,7 @@ void RasterizerStorageGLES3::_render_target_allocate(RenderTarget *rt) {
glGenTextures(1, &rt->depth);
glBindTexture(GL_TEXTURE_2D, rt->depth);
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, rt->width, rt->height, 0,
GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, NULL);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
@ -6500,7 +6500,7 @@ void RasterizerStorageGLES3::initialize() {
frame.count = 0;
frame.prev_tick = 0;
frame.delta = 0;
frame.current_rt=NULL;
frame.current_rt = NULL;
config.keep_original_textures = false;
}