summaryrefslogtreecommitdiff
path: root/servers/visual/visual_server_raster.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-01-13 10:49:26 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-01-13 10:49:26 -0300
commit2ef5a342e34df3863ac512bb3673eba28f15e9f4 (patch)
treeedb5abbc25afce7fb23d704070d43968cf4d9b33 /servers/visual/visual_server_raster.h
parent30d36581100f0bf71c6d2502be9a03443bdf8708 (diff)
-begin work on unidirectional collision detection
-fixed performance issue in new 2D engine -texscreen() working in shader 2D
Diffstat (limited to 'servers/visual/visual_server_raster.h')
-rw-r--r--servers/visual/visual_server_raster.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index d30ac17400..3fd8d7355b 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -380,6 +380,7 @@ class VisualServerRaster : public VisualServer {
List<CanvasItem*>::Element *E;
RID viewport;
int z;
+ bool z_relative;
bool sort_y;
float opacity;
float self_opacity;
@@ -396,6 +397,7 @@ class VisualServerRaster : public VisualServer {
self_opacity=1;
sort_y=false;
use_parent_shader=false;
+ z_relative=true;
}
};
@@ -600,7 +602,7 @@ class VisualServerRaster : public VisualServer {
void _render_camera(Viewport *p_viewport,Camera *p_camera, Scenario *p_scenario);
static void _render_canvas_item_viewport(VisualServer* p_self,void *p_vp,const Rect2& p_rect);
void _render_canvas_item_tree(CanvasItem *p_canvas_item,const Matrix32& p_transform,const Rect2& p_clip_rect);
- void _render_canvas_item(CanvasItem *p_canvas_item,const Matrix32& p_transform,const Rect2& p_clip_rect,float p_opacity,Rasterizer::CanvasItem **z_list,Rasterizer::CanvasItem **z_last_list,CanvasItem *p_canvas_clip,CanvasItem *p_shader_owner);
+ void _render_canvas_item(CanvasItem *p_canvas_item,const Matrix32& p_transform,const Rect2& p_clip_rect, float p_opacity,int p_z,Rasterizer::CanvasItem **z_list,Rasterizer::CanvasItem **z_last_list,CanvasItem *p_canvas_clip,CanvasItem *p_shader_owner);
void _render_canvas(Canvas *p_canvas,const Matrix32 &p_transform);
Vector<Vector3> _camera_generate_endpoints(Instance *p_light,Camera *p_camera,float p_range_min, float p_range_max);
Vector<Plane> _camera_generate_orthogonal_planes(Instance *p_light,Camera *p_camera,float p_range_min, float p_range_max);
@@ -1112,6 +1114,7 @@ public:
virtual void canvas_item_add_clip_ignore(RID p_item, bool p_ignore);
virtual void canvas_item_set_sort_children_by_y(RID p_item, bool p_enable);
virtual void canvas_item_set_z(RID p_item, int p_z);
+ virtual void canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable);
virtual void canvas_item_set_shader(RID p_item, RID p_shader);
virtual RID canvas_item_get_shader(RID p_item) const;