Comments (14)
Interesting.
I can see that auto/Makefile is supposed to be substituting these in glew.c...
perl -e "s/GLEW_VERSION_STRING/$(GLEW_VERSION)/g" -pi $@ perl -e "s/GLEW_VERSION_MAJOR_STRING/$(GLEW_MAJOR)/g" -pi $@ perl -e "s/GLEW_VERSION_MINOR_STRING/$(GLEW_MINOR)/g" -pi $@ perl -e "s/GLEW_VERSION_MICRO_STRING/$(GLEW_MICRO)/g" -pi $@
from glew.
Oh, looks like these are constant, for querying glewGetString
const GLubyte * GLEWAPIENTRY glewGetString (GLenum name) { static const GLubyte* _glewString[] = { (const GLubyte*)NULL, (const GLubyte*)"1.11.0", (const GLubyte*)"1", (const GLubyte*)"11", (const GLubyte*)"0" }; const size_t max_string = sizeof(_glewString)/sizeof(*_glewString) - 1; return _glewString[(size_t)name > max_string ? 0 : (size_t)name]; }
Not a bug?
from glew.
Hm, but it's still useful to have version constants in header file so you can determine glew version while configuring. Not in runtime.
from glew.
Something along the lines of pkg-config?
pkg-config --modversion glew
from glew.
Maybe... But I was talking about cmake configure and I'm not sure than pkg-config approach works for OS X not talking abount Windows. So constants-in-header approach seems more cross-platform friendly for me. Actually many libraries (SDL2, glfw for example) have both configure/compile time version defines in headers and runtime function to get version because runtime version can differ from compile version.
from glew.
Renaming this issue to: Feature Request: GLEW_VERSION from glew.h
from glew.
So... Any chance this feature request gets implemented any soon?
from glew.
Yeah, I'm not really opposed to it.
But I don't want to hold up a GLEW release at the moment...
from glew.
I happened across a similar feature in libpng this week.
http://sourceforge.net/p/libpng/code/ci/master/tree/png.h
Is this a good model to use?
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 6
#define PNG_LIBPNG_VER_RELEASE 16
from glew.
yeah something like that
from glew.
I've created pull request that fixes that issue in a backwards compatible way #33
from glew.
Thanks for the pull request. I put some comments over there too, do you mind revisiting this?
from glew.
I put a change into github master branch. Does it seem sufficient?
from glew.
At first look it's fine. Thanks.
from glew.
Related Issues (20)
- Port python scripts to python3 HOT 4
- Files missings during build HOT 2
- Am I hallucinating or is there no include folder in the repo? HOT 2
- Is CMakeLists.txt maintained? HOT 4
- Isnβt `dllimport` obsolete? HOT 11
- How do I compile with make include 32 bit on Ubuntu 64 Bit?
- Change CMake min version HOT 4
- Undefined references when compiling source HOT 3
- Building library fails on cmake and Makefile HOT 3
- CMakeLists is illformed
- arm64 on mac HOT 18
- Suddenly can't build GLEW anymore HOT 5
- definition of GLsizeiptr is inconsistent with Khronos gl32.h on armel and armhf HOT 1
- cmake: Undefined reference to glx functions when build with non-standard prefix path
- Bug - Files not found
- Regression testing of GLEW HOT 5
- The problem encountered when compiling with CMake on Windows HOT 2
- Could not make glew in Mac intel. several unknown type name HOT 1
- Building with MinGW LLVM: "unknown argument: -nostdlib, -soname"
- OSMesa build error under Ubuntu 24.04 and OsMesa 24.0.5 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glew.