object: use implicit native casting where possible

This commit is contained in:
Danny Robson 2017-09-14 13:14:36 +10:00
parent a303e5615a
commit 3b1019625e
2 changed files with 9 additions and 9 deletions

View File

@ -94,7 +94,7 @@ physical_device::surface_formats (surface &_surface)
{
return error::try_values (
vkGetPhysicalDeviceSurfaceFormatsKHR,
native (), _surface.native ()
native (), _surface
);
}
@ -105,7 +105,7 @@ physical_device::present_modes (surface &_surface)
{
return error::try_values (
vkGetPhysicalDeviceSurfacePresentModesKHR,
native (), _surface.native ()
native (), _surface
);
}

View File

@ -150,7 +150,7 @@ main (void)
for (int i = 0, last = queues.size (); i != last; ++i) {
if (cruft::vk::error::try_query (vkGetPhysicalDeviceSurfaceSupportKHR,
pdevice.native (), i, surface->native ())) {
pdevice.native (), i, surface)) {
present_queue_id = i;
break;
}
@ -297,7 +297,7 @@ main (void)
auto vertex_buffer = cruft::vk::make_owned<cruft::vk::buffer> (ldevice, &buffer_info, nullptr);
auto memory_requirements = cruft::vk::error::try_query (
vkGetBufferMemoryRequirements, ldevice.native (), vertex_buffer->native ()
vkGetBufferMemoryRequirements, ldevice.native (), vertex_buffer
);
auto memory_properties = pdevice.memory_properties ();
@ -319,8 +319,8 @@ main (void)
ldevice, &allocate_info, nullptr
);
cruft::vk::error::try_code (
vkBindBufferMemory (ldevice.native (), vertex_buffer->native (), vertex_memory->native (), 0)
cruft::vk::error::try_func (
vkBindBufferMemory, ldevice, vertex_buffer, vertex_memory, 0
);
{
@ -603,8 +603,8 @@ main (void)
submit_info.signalSemaphoreCount = 1;
submit_info.pSignalSemaphores = signal_semaphores;
cruft::vk::error::try_code (
vkQueueSubmit (graphics_queue->native (), 1, &submit_info, VK_NULL_HANDLE)
cruft::vk::error::try_func (
vkQueueSubmit, graphics_queue, 1, &submit_info, VK_NULL_HANDLE
);
VkSubpassDependency dependency {};
@ -627,7 +627,7 @@ main (void)
present_info.pImageIndices = &image_index;
present_info.pResults = nullptr;
cruft::vk::error::try_func (vkQueuePresentKHR, present_queue->native (), &present_info);
cruft::vk::error::try_func (vkQueuePresentKHR, present_queue, &present_info);
LOG_INFO ("entering runloop");
while (!glfwWindowShouldClose (window)) {