NastyMonk
Member
I keep getting this error. I'm trying to create a pause screen that captured the previous frame of the game and use it as an overlay for the pause screen. Here is my code:
if I comment out
The error will be gone but I don't understand why this causes the error.
What exactly does "Trying to set texture that is also bound as depth buffer - bailing..." mean? I know what depth buffer is and also the texture. But I can't make sense of this error.
GML:
/// @description Insert description here
// You can write your code in this editor
if (paused) {
// code here
if (!surface_exists(pause_surf)) {
// code here
// State switch from running to pause
instance_deactivate_all(true);
pause_surf=surface_create(camera_get_view_width(view_camera[0]),camera_get_view_height(view_camera[0]));
}
surface_set_target(pause_surf);
draw_clear_alpha(c_black,0.5);
surface_reset_target();
draw_surface(pause_surf,camera_get_view_x(view_camera[0]),camera_get_view_y(view_camera[0]));
draw_set_color(c_white);
draw_set_font(fnt_Game);
draw_set_halign(fa_middle);
draw_set_valign(fa_center);
draw_text_transformed(camera_get_view_x(view_camera[0])+camera_get_view_width(view_camera[0])/2,camera_get_view_y(view_camera[0])+camera_get_view_height(view_camera[0])/2,"Pause",0.5,0.5,0);
}
GML:
view_surface_id[0]=pause_surf;
What exactly does "Trying to set texture that is also bound as depth buffer - bailing..." mean? I know what depth buffer is and also the texture. But I can't make sense of this error.