mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-11 15:33:34 +00:00
yes
This commit is contained in:
29
Examples/D3D11/main.c
git.filemode.normal_file
29
Examples/D3D11/main.c
git.filemode.normal_file
@@ -0,0 +1,29 @@
|
||||
#include <Pulse.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void DebugCallBack(PulseDebugMessageSeverity severity, const char* message)
|
||||
{
|
||||
if(severity == PULSE_DEBUG_MESSAGE_SEVERITY_ERROR)
|
||||
{
|
||||
fprintf(stderr, "Pulse Error: %s\n", message);
|
||||
exit(1);
|
||||
}
|
||||
else if(severity == PULSE_DEBUG_MESSAGE_SEVERITY_WARNING)
|
||||
fprintf(stderr, "Pulse Warning: %s\n", message);
|
||||
else
|
||||
printf("Pulse: %s\n", message);
|
||||
}
|
||||
|
||||
#define BUFFER_SIZE (256 * sizeof(uint32_t))
|
||||
|
||||
int main(void)
|
||||
{
|
||||
PulseBackend backend = PulseLoadBackend(PULSE_BACKEND_D3D11, PULSE_SHADER_FORMAT_DXBC_BIT, PULSE_HIGH_DEBUG);
|
||||
PulseSetDebugCallback(backend, DebugCallBack);
|
||||
PulseDevice device = PulseCreateDevice(backend, NULL, 0);
|
||||
PulseUnloadBackend(backend);
|
||||
puts("Successfully executed Pulse example using D3D11 !");
|
||||
return 0;
|
||||
}
|
||||
7
Examples/D3D11/xmake.lua
git.filemode.normal_file
7
Examples/D3D11/xmake.lua
git.filemode.normal_file
@@ -0,0 +1,7 @@
|
||||
target("D3D11Example")
|
||||
add_deps("pulse_gpu")
|
||||
if is_plat("linux") then
|
||||
set_extension(".x86_64")
|
||||
end
|
||||
add_files("*.c")
|
||||
target_end()
|
||||
Reference in New Issue
Block a user