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

Source generation script rewrite #318

Open
mariob92 opened this issue Aug 27, 2021 · 4 comments
Open

Source generation script rewrite #318

mariob92 opened this issue Aug 27, 2021 · 4 comments

Comments

@mariob92
Copy link

Hello,

I'm writing a new source generation script from scratch.

If you are interested: https://github.com/MarBg92/glew/tree/source-gen-python
It's in an early state yet, but it can already generate the wglew.h file.

Improvements:

  • It's far more faster: Don't need to download the whole OpenGL registry, it only needs the .xml files
  • It doesn't need to scan the extension specification text files and so it don't needs those ugly helper scripts (filter_gl_ext.sh) to hack in some missing function and enum definitions. (I haven't checked every single entry, but the few I have checked are all present in the .xml files)

At the moment there is no support for the GL_REGAL_* extensions (from the glfixes repo) yet, because it seems that this is no part of the official OpenGL Registry, but it should be no problem to write a small .xml file which then can be parsed in.

@nigels-com
Copy link
Owner

I applaud the effort to replace the Perl, Bash and Makefile code generation.
If you can reach parity (generate the same code) it would be good for GLEW to switch over.
Just so you know, there is some Python there already, but isn't a complete replacement, yet.

Things like Regal extensions probably don't matter in the real world, but it's hard to say for sure.
I've been reluctant to curate, aiming for backwards compatibility for the most part.

@nigels-com
Copy link
Owner

Anything further about this?

@mariob92
Copy link
Author

mariob92 commented Apr 2, 2022

I haven't done much on this in the last time, but there is already some progress.
eglew.h, glxew.h and wglew.h can already be generated. I look forward to implement glew.h, glew.c and glewinfo.c soon.

But it would be hard to guarantee full backwards compatibility because GLEW has some legacy extensions (mostly REGAL and ANGLE) that are not part of the official OpenGL Registry. Maybe they can be hard coded into the source files.

@nigels-com
Copy link
Owner

Not hard to author a residual XML for REGAL, ANGLE etc.
Don't let that be a blocker.
But there will be a bunch of other nit-picky differences, I imagine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants