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

Expose glad functions when building raylib as a shared lib #3572

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

Peter0x44
Copy link
Contributor

Currently, if you build raylib as a DLL, and then try to build the examples, examples/other/raylib_opengl_interop.c will fail to link, because none of the opengl functions are exposed in raylib.dll
These can also help some binding users, like raylib-cs users who would like to call some opengl functions directly, bypassing rlgl.
Currently these users have to call wglGetProcAddress to get a function pointer manually.

examples/other/rlgl_standalone.c also has this issue, and it can be fixed by exposing GLFW. I don't know whether this is a good idea, though, since GLFW is not used by all platforms, while OpenGL is.
I'm happy to open a PR exposing those symbols too, if it's desired, though.

@raysan5 raysan5 merged commit 94aba23 into raysan5:master Nov 23, 2023
13 checks passed
@raysan5
Copy link
Owner

raysan5 commented Nov 23, 2023

@Peter0x44 the change seems minimal and at this moment I can't think of any drawback, so merging it.

@Peter0x44
Copy link
Contributor Author

@raysan5 should I do the same for GLFW? the particular example not building with the shared lib is not really important, but it could still be useful to some users. Maybe they would just be better served by building raylib with an external GLFW though.

I'm still conflicted, leaning a little more towards "no"

@raysan5
Copy link
Owner

raysan5 commented Nov 23, 2023

@Peter0x44 I prefer to avoid those platforn-specific symbols.

Peter0x44 added a commit to Peter0x44/raylib that referenced this pull request Nov 30, 2023
raysan5 pushed a commit that referenced this pull request Nov 30, 2023
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.

2 participants