uint32_t dest_stride = surf->width * 4;
char* img = vkh_image_map (stagImg);
- char* row = bitmap;
+ char* row = (char*)bitmap;
for (uint32_t y = 0; y < surf->height; y++) {
memcpy(row, img, dest_stride);
row += dest_stride;
e->dev = vkh_device_create(e->app, pi, &device_info);
e->renderer = vkh_presenter_create
- (e->dev, (uint32_t) pi->pQueue, surf, width, height, VK_FORMAT_B8G8R8A8_SRGB, presentMode);
+ (e->dev, (uint32_t) pi->pQueue, surf, width, height, VK_FORMAT_B8G8R8A8_UNORM, presentMode);
vkh_app_free_phyinfos (phyCount, phys);
for (uint32_t i=0; i<test_size; i++) {
randomize_color(ctx);
- float x1 = w*rand()/RAND_MAX;
- float y1 = h*rand()/RAND_MAX;
+ float x1 = rndf() * w;
+ float y1 = rndf() * h;
vkvg_move_to (ctx, x1, y1);
draw_random_curve(ctx);
vkvg_set_fill_rule(ctx, fill_rule);
randomize_color(ctx);
- float x1 = w*rand()/RAND_MAX;
- float y1 = h*rand()/RAND_MAX;
+ float x1 = rndf() * w;
+ float y1 = rndf() * h;
vkvg_move_to (ctx, x1, y1);
for (uint32_t i=0; i<test_size; i++) {