started entry points

pull/8/head
cosmonaut 2020-12-16 16:38:09 -08:00
parent c57842afb9
commit 6f793a5a3c
1 changed files with 47 additions and 0 deletions

View File

@ -34,3 +34,50 @@ static const REFRESH_Driver *drivers[] = {
&VulkanDriver,
NULL
};
/* Version API */
uint32_t REFRESH_LinkedVersion(void)
{
return REFRESH_COMPILED_VERSION;
}
/* Driver Functions */
static int32_t selectedDriver = -1;
REFRESH_Device* REFRESH_CreateDevice(
FNA3D_Device *fnaDevice
) {
if (selectedDriver < 0)
{
return NULL;
}
return drivers[selectedDriver]->CreateDevice(fnaDevice);
}
void REFRESH_DestroyDevice(REFRESH_Device *device)
{
if (device == NULL)
{
return;
}
device->DestroyDevice(device);
}
void REFRESH_Clear(
REFRESH_Device *device,
REFRESH_ClearOptions options,
REFRESH_Vec4 **colors,
uint32_t colorCount,
float depth,
int32_t stencil
) {
if (device == NULL)
{
return;
}
device->Clear(device->driverData, options, colors, colorCount, depth, stencil);
}