提交 969a71d7 编写于 作者: J jp9000

call NSOpenGLContext 'update' on opengl context on macos when resizing

上级 36041e9d
......@@ -220,6 +220,11 @@ void gl_windowinfo_destroy(struct gl_windowinfo *wi)
bfree(wi);
}
void gl_update(device_t device)
{
[debug->play->context update]
}
void device_entercontext(device_t device)
{
[device->plat->context makeCurrentContext];
......
......@@ -135,6 +135,8 @@ void device_resize(device_t device, uint32_t cx, uint32_t cy)
/* GL automatically resizes the device, so it doesn't do much */
device->cur_swap->info.cx = cx;
device->cur_swap->info.cy = cy;
gl_update(device);
}
void device_getsize(device_t device, uint32_t *cx, uint32_t *cy)
......
......@@ -481,6 +481,8 @@ struct gs_device {
struct fbo_info *cur_fbo;
};
extern void gl_update(device_t device);
extern struct gl_platform *gl_platform_create(device_t device,
struct gs_init_data *info);
extern struct gs_swap_chain *gl_platform_getswap(struct gl_platform *platform);
......
......@@ -390,6 +390,11 @@ static void APIENTRY gl_debug_message_amd(GLuint id,
}
#endif
void gl_update(device_t device)
{
/* does nothing on windows */
}
struct gl_platform *gl_platform_create(device_t device,
struct gs_init_data *info)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册