Custom entity pipeline fixes

This commit is contained in:
2025-07-26 01:39:16 +02:00
parent 9c2f32f5a3
commit f62203973f
3 changed files with 10 additions and 162 deletions

View File

@@ -88,9 +88,6 @@ tick_physx :: (scene: *PhysX_Scene, dt: float) {
custom_filter_shader :: (attributes0: *u32, filterData0: *PhysX.PxFilterData, attributes1: *u32, filterData1: *PhysX.PxFilterData, pairFlags: *PhysX.PxPairFlags) -> u16 #c_call {
pairFlags.* = PhysX.PxPairFlags.ContactDefault;
push_context {
print("DUDE!\n");
}
return xx PhysX.PxFilterFlags.Default;
}
@@ -302,7 +299,7 @@ create_physx_actor :: (e: *Entity) {
}
}
}
mesh_desc := PhysX.PxTriangleMeshDesc_new();
mesh_desc : PhysX.PxTriangleMeshDesc;
mesh_desc.points.count = xx points.count;
mesh_desc.points.stride = size_of(Vector3);
mesh_desc.points.data = points.data;
@@ -311,14 +308,11 @@ create_physx_actor :: (e: *Entity) {
mesh_desc.triangles.stride = 3 * size_of(u32);
mesh_desc.triangles.data = indices.data;
if !PhysX.PxValidateTriangleMesh(*cooking_params, *mesh_desc) {
assert(false);
}
//if !PhysX.PxValidateTriangleMesh(*cooking_params, *mesh_desc) {
// assert(false);
//}
stream : PhysX.PxOutputStream;
callback := PhysX.PxGetStandaloneInsertionCallback();
//read_buffer : PhysX.PxDefaultMemoryInputData_new(;
cond : s32;
mesh := PhysX.PxCreateTriangleMesh(*cooking_params, *mesh_desc, callback, null);
scale := PhysX.PxMeshScale_new(*e.transform.scale);
geo = PhysX.PxTriangleMeshGeometry_new(mesh, *scale, 0);