Implement FBO blit texture copy

This trick uses FBOs to allow for copying textures without the need for
special texture copy functions.
This commit is contained in:
jp9000
2014-02-09 11:37:22 -07:00
parent 9879eead83
commit 6ffcd5e74e
5 changed files with 80 additions and 14 deletions

View File

@@ -141,7 +141,7 @@ void device_stage_texture(device_t device, stagesurf_t dst, texture_t src)
if (!gl_copy_texture(device, dst->texture, GL_TEXTURE_2D,
tex2d->base.texture, GL_TEXTURE_2D,
dst->width, dst->height))
dst->width, dst->height, dst->format))
goto failed;
if (!gl_bind_texture(GL_TEXTURE_2D, dst->texture))