DaDonMike
Member
i'm getting this error when i minimise the game in windows or come out and back into the game on android..
___________________________________________
############################################################################################
ERROR in
action number 1
of Draw Event
for object obj_sys_lighting:
Trying to use non-existing surface.
at gml_Object_obj_sys_lighting_Draw_0 (line 3) - draw_surface(light,camera_get_view_x(view_camera[0]),camera_get_view_y(view_camera[0]));
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_sys_lighting_Draw_0 (line 3)
EDIT: iv got it working myself now.. had to ask if surface exists first..
___________________________________________
############################################################################################
ERROR in
action number 1
of Draw Event
for object obj_sys_lighting:
Trying to use non-existing surface.
at gml_Object_obj_sys_lighting_Draw_0 (line 3) - draw_surface(light,camera_get_view_x(view_camera[0]),camera_get_view_y(view_camera[0]));
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_sys_lighting_Draw_0 (line 3)
EDIT: iv got it working myself now.. had to ask if surface exists first..
Code:
if !surface_exists(light)
{
light = surface_create(camera_get_view_width(view_camera[0]),camera_get_view_height(view_camera[0]));
}
else
{
gpu_set_blendmode(bm_subtract);
draw_surface(light,camera_get_view_x(view_camera[0]),camera_get_view_y(view_camera[0]));
gpu_set_blendmode(bm_normal);
}
Last edited: