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

Macro option to hide OpenGL <=1.3 function definitions in SDL_opengl.h? #10606

Closed
Semphriss opened this issue Aug 28, 2024 · 1 comment · Fixed by #10617
Closed

Macro option to hide OpenGL <=1.3 function definitions in SDL_opengl.h? #10606

Semphriss opened this issue Aug 28, 2024 · 1 comment · Fixed by #10617
Assignees
Milestone

Comments

@Semphriss
Copy link
Contributor

I'm using OpenGL dynamically, and the function names clash with SDL's definitions in SDL_OpenGL.h. Currently, It's a mess to keep track of which functions are part of OpenGL up to 1.3, and have a special workaround for them, and even more so on platforms where the default linked version of OpenGL isn't OpenGL 1.3.

Would it be possible to have an optional macro option to not have those functions defined? Something like:

 #define GL_OPTION 0x1234
 ...
+#ifndef SDL_HIDE_FUNCTIONS
 GLAPI void GLAPIENTRY glClear( GLbitfield mask );
 GLAPI void GLAPIENTRY...
+#endif
 ...
@slouken slouken added this to the 3.2.0 milestone Aug 28, 2024
@Semphriss
Copy link
Contributor Author

I noticed that hiding the prototypes removes the function type information, as there is no PFNGLFUNCNAMEPROC for those functions. Is it fine if I add typedefs for those? (Probably guarded by the same macro, since they don't seem to be part of standard OpenGL)

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.

4 participants
@icculus @slouken @Semphriss and others