nigels-com / glew

The OpenGL Extension Wrangler Library
Other
2.62k stars 614 forks source link

Missing src files #31

Closed Markyparky56 closed 7 years ago

Markyparky56 commented 9 years ago

src folder only contains visualinfo.c but not glew.c and glewinfo.c. They also aren't present in the sourceforge git repo either. These are present in the .zip download however.

turol commented 9 years ago

Not a bug and a duplicate of #13

nigels-com commented 9 years ago

Yeah, this question comes up from time to time. The issue is that most of GLEW is generated by perl scripts. The sources change from day to day, depending on what's changing on opengl.org. So it would be a nuisance to try and track that in the GLEW repository. But the downloads are complete snapshots, and besides that I've been putting "developer" snapshots there too if it's been a while since an official release. I'll leave this issue open for the purpose of clarifying this on the homepage.

PhilipDeegan commented 9 years ago

why not include them in tags?

nigels-com commented 9 years ago

The generated GLEW sources are fairly bulky, I'd rather leave all that out of the git history, personally.

nigels-com commented 9 years ago

For the past several years I've been making a git history of the opengl.org "registry" that GLEW uses for generating the source code. In principle it would be possible to "walk forward in time" change-by-change in both GLEW and glfixes and recreate the complete history of the sources. We'd need some kind of script (I'd suggest Python, personally) to perform that, and continue into the future. But it's not something on my priority list, compared to, say, core profile support.

BastiaanOlij commented 9 years ago

Why not add a readme in the source folder to explain why the files aren't there? It caught me off guard too until I noticed I need to first run make in the auto folder

Also maybe add something to the main makefile that tests if the source files are there and if not outputs a hint to first run make in the auto folder to build the source?

BastiaanOlij commented 9 years ago

I assume btw that the "make extensions" remark in the main makefile does the same thing?

chrismdp commented 9 years ago

make extensions appears to work for me. Might be worth changing the Makefile to do this by default, and skip if it a downloaded snapshot already exists? That's the behaviour I would have expected.

nigels-com commented 9 years ago

Quite often doing this by default will result in a broken build. Occasionally the extension specifications change in a way that GLEW doesn't handle properly.

chrismdp commented 9 years ago

Aha, that makes sense.

Thanks for making glew BTW - it's super useful!

tamaskenez commented 9 years ago

I've just set up a few branches on my glew fork with the extensions automatically updated by a script (merged onto glew/master and release tags). Feel free to use it.

I see Nigel's points but I needed a repo which builds GLEW without make (extensions).

MarkCallow commented 8 years ago

I need glew to work with core profile. Unfortunately the core profile branches in @tamaskenez's fork do not contain glew.c and glewinfo.c.

I am at my wits end. I have tried "make extensions" in both Git Shell and Git Bash (Windows 10), which are both msys & mingw based, but get errors in both. Git Bash doesn't work at all. I get:

$ make extensions
process_begin: CreateProcess(NULL, mktemp -d /tmp/glew.XXXXXX, ...) failed.
C:/Program Files (x86)/Git/bin/make -C auto
"C:/Program Files (x86)/Git/bin/sh.exe": -c: line 0: syntax error near unexpecte
d token `('
"C:/Program Files (x86)/Git/bin/sh.exe": -c: line 0: `C:/Program Files (x86)/Git
/bin/make -C auto'
Makefile:419: recipe for target 'extensions' failed
make: *** [extensions] Error 258

Git Shell starts to run, spitting out the same "process begin: ... failed" message but then it successfully fetches a bunch of stuff from the repo. However next it encounters the following

--------------------------------------------------------------------
Creating descriptors
--------------------------------------------------------------------
rm -rf extensions/gl
bin/update_ext.sh extensions/gl registry/gl/specs blacklist
Integer overflow in hexadecimal number at bin/parse_spec.pl line 354.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 354.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 358.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 358.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 354.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 354.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 358.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 358.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 354.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 354.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 358.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 358.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 354.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 354.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 358.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 358.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 354.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 354.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 358.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 358.
bin/filter_gl_ext.sh     extensions/gl
Can't do inplace edit on extensions/gl/GL_HP_occlusion_test: Permission denied.
Can't open extensions/gl/GL_HP_occlusion_test: No such file or directory.
Can't do inplace edit on extensions/gl/GL_ARB_vertex_shader: Permission denied.
Can't open extensions/gl/GL_ARB_vertex_shader: No such file or directory.
Can't open extensions/gl/GL_ARB_vertex_shader: No such file or directory.
Can't open extensions/gl/GL_ARB_vertex_shader: No such file or directory.
grep: extensions/gl/GL_ARB_vertex_shader: No such file or directory
Makefile:112: recipe for target 'extensions/gl/.dummy' failed
make[1]: *** [extensions/gl/.dummy] Error 2
make[1]: Leaving directory 'c:/Users/mark/Projects/GitHub/glew/auto'
Makefile:419: recipe for target 'extensions' failed
make: *** [extensions] Error 2

The mentioned files indeed do not exist. Why the first error is Permission Denied I do not know. The directory auto/extensions is owned my me and is writable.

Any suggestions? I really don't want to install cygwin. Git Shell seems to have all the commands needed, except make which I added myself.

Does anybody have source files that work with core profile?

The core profile branches seem to have a Mac focus but many of us are using core profile contexts on Windows as well. In fact GLEW is less needed on Mac as you can statically link all core profile functions; you only need glew if you are using extensions. On Windows you need it if you are using anything more recent than OpenGL 1.2.

It has been a ridiculous number of years (8) since core profiles were introduced. Why is glew master (and thus the snapshots) still broken with regards to this?

nigels-com commented 8 years ago

I'll see about uploading a snapshot of the core-context4 branch on sourceforge for download.

The essential reason for the slow uptake on core profiles is that it's an invasive change for GLEW, and various attempts have needed to make various trade offs.

Running the code gen scripts on Windows has been an ongoing issue too, I generally don't recommend even trying, although there have been reports that certain setups can be made to work.

nigels-com commented 8 years ago

I rolled out some more infrastructure for GLEW today. There is a Travis build that will trigger, and an Amazon S3 bucket for archiving the tarballs. A fresh build of core-context4 GLEW is now available:

https://glew.s3.amazonaws.com/index.html?prefix=nigels-com/glew/25/25.1/

chrismdp commented 8 years ago

Awesome - thanks! :)

MarkCallow commented 8 years ago

Thanks. I downloaded the src from amazonaws and have successfully built GLEW for both OS X and Windows and have been able to remove from my app the hacks I needed for the non-core friendly GLEW.

The compilation on OS X took so long, upwards of 5 minutes, I was reminded of working with an 8080 processor and floppy disk drives!!!

nigels-com commented 8 years ago

Was the OS X build in release mode with optimisations? Just curious.

nigels-com commented 7 years ago

Closing as a duplicate of https://github.com/nigels-com/glew/issues/13 Thanks for the report.