nigels-com / glew

The OpenGL Extension Wrangler Library
Other
2.58k stars 609 forks source link

Source generation script rewrite #318

Open mariob92 opened 2 years ago

mariob92 commented 2 years ago

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:

At the moment there is no support for the GLREGAL* 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 commented 2 years ago

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 commented 2 years ago

Anything further about this?

mariob92 commented 2 years ago

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 commented 2 years ago

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.