Gawain: remove GWN_batch_discard_all

Use ownership flags instead.
This commit is contained in:
2017-08-16 19:50:27 +10:00
parent 18ce2bfac6
commit 846c11c8cf
13 changed files with 120 additions and 190 deletions

View File

@@ -93,7 +93,7 @@ static Gwn_Batch *batch_sphere(int lat_res, int lon_res)
}
}
return GWN_batch_create(GWN_PRIM_TRIS, vbo, NULL);
return GWN_batch_create_ex(GWN_PRIM_TRIS, vbo, NULL, GWN_BATCH_OWNS_VBO);
}
static Gwn_Batch *batch_sphere_wire(int lat_res, int lon_res)
@@ -125,7 +125,7 @@ static Gwn_Batch *batch_sphere_wire(int lat_res, int lon_res)
}
}
return GWN_batch_create(GWN_PRIM_LINES, vbo, NULL);
return GWN_batch_create_ex(GWN_PRIM_LINES, vbo, NULL, GWN_BATCH_OWNS_VBO);
}
Gwn_Batch *Batch_get_sphere(int lod)
@@ -163,9 +163,9 @@ void gpu_batch_init(void)
void gpu_batch_exit(void)
{
GWN_batch_discard_all(sphere_low);
GWN_batch_discard_all(sphere_med);
GWN_batch_discard_all(sphere_high);
GWN_batch_discard_all(sphere_wire_low);
GWN_batch_discard_all(sphere_wire_med);
GWN_batch_discard(sphere_low);
GWN_batch_discard(sphere_med);
GWN_batch_discard(sphere_high);
GWN_batch_discard(sphere_wire_low);
GWN_batch_discard(sphere_wire_med);
}