libobs-opengl: Implement windowless context
(Non-compiling commit: windowless-context branch)
This commit is contained in:
parent
eb459e2adc
commit
a496f64de4
@ -202,12 +202,12 @@ const char *device_preprocessor_name(void)
|
|||||||
return "_OPENGL";
|
return "_OPENGL";
|
||||||
}
|
}
|
||||||
|
|
||||||
int device_create(gs_device_t **p_device, const struct gs_init_data *info)
|
int device_create(gs_device_t **p_device, uint32_t adapter)
|
||||||
{
|
{
|
||||||
struct gs_device *device = bzalloc(sizeof(struct gs_device));
|
struct gs_device *device = bzalloc(sizeof(struct gs_device));
|
||||||
int errorcode = GS_ERROR_FAIL;
|
int errorcode = GS_ERROR_FAIL;
|
||||||
|
|
||||||
device->plat = gl_platform_create(device, info);
|
device->plat = gl_platform_create(device, adapter);
|
||||||
if (!device->plat)
|
if (!device->plat)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
@ -219,7 +219,7 @@ int device_create(gs_device_t **p_device, const struct gs_init_data *info)
|
|||||||
gl_enable(GL_CULL_FACE);
|
gl_enable(GL_CULL_FACE);
|
||||||
|
|
||||||
device_leave_context(device);
|
device_leave_context(device);
|
||||||
device->cur_swap = gl_platform_getswap(device->plat);
|
device->cur_swap = NULL;
|
||||||
|
|
||||||
*p_device = device;
|
*p_device = device;
|
||||||
return GS_SUCCESS;
|
return GS_SUCCESS;
|
||||||
|
@ -511,8 +511,7 @@ extern struct fbo_info *get_fbo(struct gs_device *device,
|
|||||||
extern void gl_update(gs_device_t *device);
|
extern void gl_update(gs_device_t *device);
|
||||||
|
|
||||||
extern struct gl_platform *gl_platform_create(gs_device_t *device,
|
extern struct gl_platform *gl_platform_create(gs_device_t *device,
|
||||||
const struct gs_init_data *info);
|
uint32_t adapter);
|
||||||
extern struct gs_swap_chain *gl_platform_getswap(struct gl_platform *platform);
|
|
||||||
extern void gl_platform_destroy(struct gl_platform *platform);
|
extern void gl_platform_destroy(struct gl_platform *platform);
|
||||||
|
|
||||||
extern bool gl_platform_init_swapchain(struct gs_swap_chain *swap);
|
extern bool gl_platform_init_swapchain(struct gs_swap_chain *swap);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user