1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

-Added ViewportContainer, this is the only way to make viewports show up in GUI now

-2D editing now seems to work
-Added some functions and refactoring to Viewport
This commit is contained in:
Juan Linietsky
2016-10-05 01:26:35 -03:00
parent a6e9dc6153
commit cf5778e51a
20 changed files with 340 additions and 136 deletions

View File

@@ -141,7 +141,7 @@ void RasterizerGLES3::set_current_render_target(RID p_render_target){
storage->frame.current_rt=rt;
storage->frame.clear_request=false;
glViewport(0,0,rt->width,rt->height);
glViewport(0,0,rt->width,rt->height);
} else {
storage->frame.current_rt=NULL;
@@ -155,6 +155,7 @@ void RasterizerGLES3::restore_render_target() {
ERR_FAIL_COND(storage->frame.current_rt==NULL);
RasterizerStorageGLES3::RenderTarget * rt = storage->frame.current_rt;
glBindFramebuffer(GL_FRAMEBUFFER,rt->front.fbo);
glViewport(0,0,rt->width,rt->height);
}
@@ -176,6 +177,7 @@ void RasterizerGLES3::blit_render_target_to_screen(RID p_render_target,const Rec
ERR_FAIL_COND(!rt);
canvas->canvas_begin();
glDisable(GL_BLEND);
glBindFramebuffer(GL_FRAMEBUFFER,storage->config.system_fbo);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D,rt->front.color);