benchmark_gmio: fix compilation errors due to recent API changes
This commit is contained in:
parent
53002389e1
commit
8f4064ab7e
@ -66,6 +66,7 @@ enum { STL_TRIANGLE_ARRAY_SIZE = 512 };
|
||||
typedef struct stl_readwrite_conv
|
||||
{
|
||||
gmio_transfer_t trsf;
|
||||
gmio_stream_pos_t out_stream_pos_begin;
|
||||
gmio_stl_format_t in_format;
|
||||
gmio_stl_format_t out_format;
|
||||
gmio_stl_triangle_t triangle_array[STL_TRIANGLE_ARRAY_SIZE];
|
||||
@ -152,7 +153,7 @@ static void readwrite_end_solid(void* cookie)
|
||||
const gmio_endianness_t byte_order = to_byte_order(rw_conv->out_format);
|
||||
/* The total facet count has to be written because it wasn't known at
|
||||
* the beginning of the read procedure */
|
||||
stream->func_rewind(stream->cookie);
|
||||
stream->func_set_pos(stream->cookie, &rw_conv->out_stream_pos_begin);
|
||||
gmio_stlb_write_header(
|
||||
stream, byte_order, NULL, rw_conv->total_triangle_count);
|
||||
}
|
||||
@ -178,6 +179,9 @@ static void bench_gmio_stl_readwrite_conv(const char* filepath)
|
||||
if (outfile != NULL) {
|
||||
rw_conv.trsf.buffer = gmio_buffer_malloc(512 * 1024);
|
||||
rw_conv.trsf.stream = gmio_stream_stdio(outfile);
|
||||
rw_conv.trsf.stream.func_get_pos(
|
||||
rw_conv.trsf.stream.cookie,
|
||||
&rw_conv.out_stream_pos_begin);
|
||||
}
|
||||
|
||||
mesh_creator.cookie = &rw_conv;
|
||||
|
Loading…
Reference in New Issue
Block a user