call NSOpenGLContext 'update' on opengl context on macos when resizing
This commit is contained in:
parent
36041e9d80
commit
969a71d716
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user