First development release - WIP

This commit is contained in:
2018-09-18 20:00:49 +02:00
parent 9d8cc24939
commit a839879baa
13 changed files with 1080 additions and 1 deletions

29
src/instance.c Normal file
View File

@@ -0,0 +1,29 @@
#include "instance.h"
#include "lvrc_internal.h"
#include <malloc.h>
#ifdef ENABLE_XCB
# include <xcb/xcb.h>
#endif // ENABLE_XCB
struct lvrcInstance * lvrcCreateInstance(ohmd_device * hmd)
{
Instance * instance = calloc(1, sizeof(Instance));
instance->device = hmd;
#ifdef ENABLE_XCB
instance->connection = xcb_connect(NULL, &instance->screen);
#endif // ENABLE_XCB
instance->swapChain = NULL;
return (struct lvrcInstance *)instance;
}
void lvrcDestroyInstance(struct lvrcInstance * instance)
{
free(instance);
}