Any time I draw text normally, I get the normal result. As soon as text is drawn with a loaded font, though, it shows a garbled mess of sprite segments. I think it may be getting parts of the surface layer, but trying different fonts, files, and sizes make no difference.
A picture, when using a font.
And when not using a font:
For more information, here is a segment from another object where I'm drawing to the surface.
I assume the problem is that the surface texture memory is used when text is drawn somehow. The drawing of the text is happening in a separate object in the GUI event. Do I need to draw text inside the surface procedure?
Thanks in advance,
AnalogF6
A picture, when using a font.
And when not using a font:
For more information, here is a segment from another object where I'm drawing to the surface.
Code:
var lay_id = layer_get_id("Wall_Layer");
var map_id = layer_tilemap_get_id(lay_id);
if ds_grid_get(wallgrid,xcheck,ycheck) != 0
{
draw_self()
surface_set_target(shadow)
draw_tilemap(map_id,0,0)
gpu_set_colorwriteenable(false,false,false,true)
draw_tilemap(map_id,0,0)
gpu_set_colorwriteenable(true,true,true,false)
draw_sprite_part_ext(spr_cap_walktest,image_index,0,0,16,16,x,y,1,1,c_black,.5)
surface_reset_target()
draw_surface(shadow,0,0)
}
else
draw_self()
Thanks in advance,
AnalogF6