T
TomatoFantasyStudio
Guest
Please, can anyone tell me, maybe I use surfaces the wrong way?Hey, everyone!
Can anyone help me?
I create surfaces like in code below.
And createtion code.
And get VERY bad perfomance. Even with low resolution.
Please, can anyone tell me, maybe I use sufaces the wrong way?
Can anyone help me?
I create surfaces like in code below.
Code:
surface_set_target(application_surface);
//Draw blood of wounds, fullscreen animation of glitches etc.
surface_reset_target();
//If don't need to use colour displacement shader (hero is alright). Use ONLY shader 1
{
shader_set(<shader1_name>); //Draw shader 1
draw_surface(application_surface,0,0);
shader_reset();
}
else
//If needed to draw colour displacement shader in addition (when hero were wounded). Use shader 1 AND shader 2
{
if !surface_exists(surfa)
{
surfa = surface_create(gui_w, gui_h);
}
shader_set(<shader1_name>); //Draw shader 1
surface_set_target(surfa);
draw_surface(application_surface,0,0);
surface_reset_target();
shader_reset();
shader_set(<shader2_name>); //Shader 2 - colour displacement
draw_surface(surfa,0,0);
shader_reset();
}
Code:
surfa = -1;
gui_w = display_get_gui_width();
gui_h = display_get_gui_height();
surface_resize(application_surface, gui_w, gui_h);
application_surface_draw_enable(false);
And get VERY bad perfomance. Even with low resolution.
Please, can anyone tell me, maybe I use sufaces the wrong way?
Last edited by a moderator: