forked from MoonsideGames/Refresh
add Present call to API
parent
67b0503935
commit
fd731ac648
|
@ -1243,6 +1243,14 @@ REFRESHAPI void REFRESH_BindGraphicsPipeline(
|
|||
REFRESH_GraphicsPipeline *graphicsPipeline
|
||||
);
|
||||
|
||||
/* Presentation */
|
||||
|
||||
REFRESHAPI void REFRESH_Present(
|
||||
REFRESH_Device *device,
|
||||
REFRESH_Rect *sourceRectangle,
|
||||
REFRESH_Rect *destinationRectangle
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
|
|
@ -808,4 +808,17 @@ void REFRESH_BindGraphicsPipeline(
|
|||
);
|
||||
}
|
||||
|
||||
void REFRESH_Present(
|
||||
REFRESH_Device *device,
|
||||
REFRESH_Rect *sourceRectangle,
|
||||
REFRESH_Rect *destinationRectangle
|
||||
) {
|
||||
NULL_RETURN(device);
|
||||
device->Present(
|
||||
device->driverData,
|
||||
sourceRectangle,
|
||||
destinationRectangle
|
||||
);
|
||||
}
|
||||
|
||||
/* vim: set noexpandtab shiftwidth=8 tabstop=8: */
|
||||
|
|
|
@ -490,6 +490,12 @@ struct REFRESH_Device
|
|||
REFRESH_GraphicsPipeline *graphicsPipeline
|
||||
);
|
||||
|
||||
void(*Present)(
|
||||
REFRESH_Renderer *driverData,
|
||||
REFRESH_Rect *sourceRectangle,
|
||||
REFRESH_Rect *destinationRectangle
|
||||
);
|
||||
|
||||
/* Opaque pointer for the Driver */
|
||||
REFRESH_Renderer *driverData;
|
||||
};
|
||||
|
@ -539,7 +545,8 @@ struct REFRESH_Device
|
|||
ASSIGN_DRIVER_FUNC(AddDisposeGraphicsPipeline, name) \
|
||||
ASSIGN_DRIVER_FUNC(BeginRenderPass, name) \
|
||||
ASSIGN_DRIVER_FUNC(EndRenderPass, name) \
|
||||
ASSIGN_DRIVER_FUNC(BindGraphicsPipeline, name)
|
||||
ASSIGN_DRIVER_FUNC(BindGraphicsPipeline, name) \
|
||||
ASSIGN_DRIVER_FUNC(Present, name)
|
||||
|
||||
typedef struct REFRESH_Driver
|
||||
{
|
||||
|
|
|
@ -704,6 +704,14 @@ static void VULKAN_BindGraphicsPipeline(
|
|||
SDL_assert(0);
|
||||
}
|
||||
|
||||
static void VULKAN_Present(
|
||||
REFRESH_Renderer *renderer,
|
||||
REFRESH_Rect *sourceRectangle,
|
||||
REFRESH_Rect *destinationRectangle
|
||||
) {
|
||||
SDL_assert(0);
|
||||
}
|
||||
|
||||
/* Swapchain */
|
||||
|
||||
static inline VkExtent2D VULKAN_INTERNAL_ChooseSwapExtent(
|
||||
|
|
Loading…
Reference in New Issue