Skip to content

demo/glfw_opengl3 Remove global state#123

Merged
Hejsil merged 1 commit intoImmediate-Mode-UI:masterfrom
riri:glfw-no-global
Apr 30, 2020
Merged

demo/glfw_opengl3 Remove global state#123
Hejsil merged 1 commit intoImmediate-Mode-UI:masterfrom
riri:glfw-no-global

Conversation

@riri
Copy link
Copy Markdown
Contributor

@riri riri commented Apr 30, 2020

Port vurtun PR, fixes #107

@maddouri statement:

Thanks for your interest in the PR. IMHO, not having a global state ought to be a requirement for all code samples.
Unfortunately, I doubt that I would have enough resources to dedicate to porting vurtun/nuklear#760 to this repo.

To anyone interested: please feel free to adapt my PR's code to this new repo :)

@Hejsil
Copy link
Copy Markdown
Contributor

Hejsil commented Apr 30, 2020

Looks good!

@Hejsil Hejsil merged commit 511b4e7 into Immediate-Mode-UI:master Apr 30, 2020
@riri riri deleted the glfw-no-global branch April 30, 2020 17:57
@riri
Copy link
Copy Markdown
Contributor Author

riri commented Apr 30, 2020

I just realized that putting the implementation in main source is needed to make the backend available, because the struct nk_glfw is not defined in the "header" part.

Wouldn't it be better to move the definition of struct nk_glfw before the NK_GLFW_GL3_IMPLEMENTATION part?

@riri riri restored the glfw-no-global branch April 30, 2020 17:59
@riri riri deleted the glfw-no-global branch May 12, 2020 21:34
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 this pull request may close these issues.

demo/glfw_opengl3 Remove global state

2 participants