Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calling sg_reset_state_cache produces opengl error 0x502 #29

Closed
pplux opened this issue Jan 9, 2018 · 1 comment · Fixed by #30
Closed

calling sg_reset_state_cache produces opengl error 0x502 #29

pplux opened this issue Jan 9, 2018 · 1 comment · Fixed by #30
Assignees

Comments

@pplux
Copy link
Contributor

pplux commented Jan 9, 2018

Every frame I'm rendering I mix sokol with other opengl related libraries, not a good Idea I know, but sokol is supposed to handle that with sg_reset_state_cache, doesn't it?

the order is:

  1. render with sokol
  2. render with another_lib (nanovg)
  3. frame
  4. call sg_reset_state_cache
    --> something inside sg_reset_state_cache produces OpenGL error 0x502
  5. sokol refuses to render due to openGL error

If I clear openglErrors between 4 and 5, it works... but something is not right.

(Thanks for an awesome library, btw 👍 )

PD: The proper way is to implement a nanovg backend on top of soko_gfx, I know! Just need time.

@floooh
Copy link
Owner

floooh commented Jan 9, 2018

Strange indeed... mixing with native API calls is supported of course, but is so far only tested in the 'inject' samples, so may be I overlooked something.

Is your repo public so that I could try to reproduce the problem? I'd like to find out where exactly in sg_reset_state_cache() the problem happens.

The following info would also be about your config would also be helpful: operating system, GPU model and maybe driver version (or if you're on Windows you can run "dxdiag" , save the information to a text file and attach it here, this is for D3D, but the hardware/driver info is right anyway).

@floooh floooh self-assigned this Jan 9, 2018
pplux added a commit to pplux/sokol that referenced this issue Jan 9, 2018
floooh added a commit that referenced this issue Jan 10, 2018
FIX: calling sg_reset_state_cache produces opengl error 0x502 (fixes #29)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants