- vg_info( "Generating random test point cloud\n" );
-
- vg_rand_seed( 2000 );
- vg_async_item *call =
- vg_async_alloc( sizeof(struct pointcloud_vert)*POINTCLOUD_POINTS );
- struct pointcloud_vert *test_data = call->payload;
- call->size = POINTCLOUD_POINTS;
-
- for( u32 i=0; i<POINTCLOUD_POINTS; i++ ){
- test_data[i].pos[0] = vg_randf64() * 65535.0f;
- test_data[i].pos[1] = vg_randf64() * 65535.0f;
- test_data[i].pos[2] = vg_randf64() * 65535.0f;
-
- v3f norm;
- vg_rand_dir( norm );
-
- test_data[i].norm[0] = norm[0] * 127.0f;
- test_data[i].norm[1] = norm[1] * 127.0f;
- test_data[i].norm[2] = norm[2] * 127.0f;
-
- test_data[i].colour[0] = 90;
- test_data[i].colour[1] = 90;
- test_data[i].colour[2] = 90;
- test_data[i].colour[3] = 255;
- }
-
- vg_async_dispatch( call, async_pointcloud_alloc );