diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-12-08 17:48:03 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-12-08 17:48:03 -0300 |
commit | c650d4e19c1f1fffc2f798db3d18a1ad1a58ab8b (patch) | |
tree | 4b9280503112055e2431344547001db59702e69c /drivers/gles2 | |
parent | 09ff4571859b012b64876883e186bb7dfaca0c8c (diff) | |
parent | e176bb6a7c736e8f2fe7fb96f2a4ecbb296dced0 (diff) |
Merge branch 'master' of https://github.com/godotengine/godot
Diffstat (limited to 'drivers/gles2')
-rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 63 |
1 files changed, 51 insertions, 12 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index c6d8d9e9bf..d0f2f88ee6 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -9169,10 +9169,23 @@ void RasterizerGLES2::_canvas_item_render_commands(CanvasItem *p_item,CanvasItem //glScissor(viewport.x+current_clip->final_clip_rect.pos.x,viewport.y+ (viewport.height-(current_clip->final_clip_rect.pos.y+current_clip->final_clip_rect.size.height)), //current_clip->final_clip_rect.size.width,current_clip->final_clip_rect.size.height); - int x = current_clip->final_clip_rect.pos.x; - int y = window_size.height-(current_clip->final_clip_rect.pos.y+current_clip->final_clip_rect.size.y); - int w = current_clip->final_clip_rect.size.x; - int h = current_clip->final_clip_rect.size.y; + int x; + int y; + int w; + int h; + + if (current_rt) { + x = current_clip->final_clip_rect.pos.x; + y = current_clip->final_clip_rect.pos.y; + w = current_clip->final_clip_rect.size.x; + h = current_clip->final_clip_rect.size.y; + } + else { + x = current_clip->final_clip_rect.pos.x; + y = window_size.height - (current_clip->final_clip_rect.pos.y + current_clip->final_clip_rect.size.y); + w = current_clip->final_clip_rect.size.x; + h = current_clip->final_clip_rect.size.y; + } glScissor(x,y,w,h); @@ -9362,10 +9375,23 @@ void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list,int p_z,const int w = current_clip->final_clip_rect.size.x; int h = current_clip->final_clip_rect.size.y; */ - int x = current_clip->final_clip_rect.pos.x; - int y = window_size.height-(current_clip->final_clip_rect.pos.y+current_clip->final_clip_rect.size.y); - int w = current_clip->final_clip_rect.size.x; - int h = current_clip->final_clip_rect.size.y; + int x; + int y; + int w; + int h; + + if (current_rt) { + x = current_clip->final_clip_rect.pos.x; + y = current_clip->final_clip_rect.pos.y; + w = current_clip->final_clip_rect.size.x; + h = current_clip->final_clip_rect.size.y; + } + else { + x = current_clip->final_clip_rect.pos.x; + y = window_size.height - (current_clip->final_clip_rect.pos.y + current_clip->final_clip_rect.size.y); + w = current_clip->final_clip_rect.size.x; + h = current_clip->final_clip_rect.size.y; + } glScissor(x,y,w,h); @@ -9667,10 +9693,23 @@ void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list,int p_z,const //glScissor(viewport.x+current_clip->final_clip_rect.pos.x,viewport.y+ (viewport.height-(current_clip->final_clip_rect.pos.y+current_clip->final_clip_rect.size.height)), //current_clip->final_clip_rect.size.width,current_clip->final_clip_rect.size.height); - int x = current_clip->final_clip_rect.pos.x; - int y = window_size.height-(current_clip->final_clip_rect.pos.y+current_clip->final_clip_rect.size.y); - int w = current_clip->final_clip_rect.size.x; - int h = current_clip->final_clip_rect.size.y; + int x; + int y; + int w; + int h; + + if (current_rt) { + x = current_clip->final_clip_rect.pos.x; + y = current_clip->final_clip_rect.pos.y; + w = current_clip->final_clip_rect.size.x; + h = current_clip->final_clip_rect.size.y; + } + else { + x = current_clip->final_clip_rect.pos.x; + y = window_size.height - (current_clip->final_clip_rect.pos.y + current_clip->final_clip_rect.size.y); + w = current_clip->final_clip_rect.size.x; + h = current_clip->final_clip_rect.size.y; + } glScissor(x,y,w,h); |