edubart / sokol_gp

Minimal modern efficient cross platform 2D graphics painter in C
MIT No Attribution
450 stars 24 forks source link

Is sokol_gp supposed to work with multiple sokol_gfx contexts? #14

Open larpon opened 2 years ago

larpon commented 2 years ago

I've been try to get sokol_gp to work with multiple sokol_gfx contexts I've tried to patch the code a bit here and there (just simple things, like removing the init_cookie check) - but I can't really get it to work properly. Do you think it could be possible to make it work somehow?

larpon commented 2 years ago

Small update

I got it working to an extend where it renders, seemingly, fine, by simply commenting out the init_cookie check: image

But when shutting the system I get a few errors from sokol:

_sg_uninit_pipeline: active context mismatch (must be same as for creation)
_sg_uninit_pipeline: active context mismatch (must be same as for creation)
_sg_uninit_pipeline: active context mismatch (must be same as for creation)
_sg_uninit_pipeline: active context mismatch (must be same as for creation)
_sg_uninit_pipeline: active context mismatch (must be same as for creation)
_sg_uninit_pipeline: active context mismatch (must be same as for creation)
_sg_uninit_pipeline: active context mismatch (must be same as for creation)
_sg_uninit_shader: active context mismatch (must be same as for creation)
_sg_uninit_buffer: active context mismatch (must be same as for creation)
_sg_uninit_image: active context mismatch (must be same as for creation)