First development release - WIP
This commit is contained in:
29
src/instance.c
Normal file
29
src/instance.c
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user