how to clear a shader to reset the regular application surface

Heavybrush

Member
no, shader reset is needed to close the code of the shader setting
you need to apply the shader and reset the shader, but the shader remain

for instance:
creation
application_surface_draw_enable(false);

draw gui
shader_set(shd_cga);
draw_surface_ext(application_surface,0,0,2,2,0,c_white,1);
shader_reset();

you can see the first raw of the draw gui setting the shader
the second redrawing the surface because of the creation code (to set a shader you need to disable the surface, applying the shader and reanable the surface or redraw)
and the third resetting the shader (to close the code)

is for this reason that I need an answer to clear the shader
because I don't know how to delete it, there is not a shader_set(nothing)
 
W

Wraithious

Guest
The shader will loop untill you stop it, so you can use a variable for this, so you'd have in the draw gui event
Code:
if(can_cga)
{
shader_set(shd_cga);
draw_surface_ext(application_surface,0,0,2,2,0,c_white,1);
shader_reset();
}
else
draw_self();
 
Top