adding Vulkan device creation, adding unit tests, adding few API function declarations

This commit is contained in:
2024-10-10 15:22:56 +02:00
parent f189928c82
commit 405c8b186a
23 changed files with 517 additions and 64 deletions

23
Examples/Vulkan/main.c git.filemode.normal_file
View File

@@ -0,0 +1,23 @@
#include <Pulse.h>
#include <stdio.h>
#define CHECK_PULSE_HANDLE_RETVAL(handle, retval) \
if(handle == PULSE_NULL_HANDLE) \
{ \
fprintf(stderr, "Error: %s", PulseVerbaliseErrorType(PulseGetLastErrorType())); \
return retval; \
} \
int main(void)
{
PulseBackend backend = PulseLoadBackend(PULSE_BACKEND_VULKAN, PULSE_SHADER_FORMAT_SPIRV_BIT, PULSE_NO_DEBUG);
CHECK_PULSE_HANDLE_RETVAL(backend, 1);
PulseDevice device = PulseCreateDevice(backend, NULL, 0);
CHECK_PULSE_HANDLE_RETVAL(device, 1);
PulseDestroyDevice(device);
PulseUnloadBackend(backend);
puts("Successfully loaded Pulse using Vulkan !");
return 0;
}