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

GSoC 2023: Macro to allow building with OpenGL Core #4738

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

jbinvnt
Copy link
Contributor

@jbinvnt jbinvnt commented Sep 10, 2023

If compiled with -DDISABLE_FIXEDFUNCTION_GL, all API calls to legacy OpenGL functions are removed. Otherwise this PR is a no-op. The mxe-64 test is failing because so is the current master branch.

@jbinvnt jbinvnt changed the title GSoC 2023: Build with OpenGL 3.0 Core context GSoC 2023: Macro to allow building with OpenGL 3.0 Core Sep 10, 2023
@jbinvnt jbinvnt changed the title GSoC 2023: Macro to allow building with OpenGL 3.0 Core GSoC 2023: Macro to allow building with OpenGL 3.2 Core Sep 10, 2023
@jbinvnt jbinvnt changed the title GSoC 2023: Macro to allow building with OpenGL 3.2 Core GSoC 2023: Macro to allow building with OpenGL Core Sep 22, 2023
@jbinvnt jbinvnt marked this pull request as ready for review September 22, 2023 19:39
@kintel
Copy link
Member

kintel commented Sep 29, 2023

One note: This PR was created by generating bindings where only OpenGL 3.2 core profile entry points are available. However, modern OpenGL is defined by not only entry point but also how these entry points are used.
Example: glGetIntegerv(GL_RED_BITS, ... isn't available in OpenGL 3.2 core, but wasn't removed by this PR:

glGetIntegerv(GL_RED_BITS, &rbits);

There are numerous similar examples in the codebase. Finding them all may be quite some work, and I'm not convinced that partially removing legacy calls is worth merging to master, especially without a more concrete plan for how to proceed.

I'll think and tinker with this over the next few months and see if I can come up with a plan.

@jbinvnt
Copy link
Contributor Author

jbinvnt commented Oct 2, 2023

@kintel can you let me know if there is a more intuitive source I can look at for listing these additional removed features? My general guide has been the instructions from the wiki but a quick search there doesn't return anything for GL_RED_BITS (or even .*_BITS).

I'm also curious why the compiler even let this build with Core Profile headers if I missed some legacy calls.

@kintel
Copy link
Member

kintel commented Oct 3, 2023

You weren't missing legacy calls, but legacy argument to calls.

The OpenGL 3.2 core profile spec, appendix E.2.2 is a great start: https://registry.khronos.org/OpenGL/specs/gl/glspec32.core.pdf

..but the easiest road to success may be running tests until they pass, but that may require a more bottom-up approach.

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.

None yet

2 participants