Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#28 Selective initialization

Nigel Stewart

As more and more extensions are added to OpenGL, glewInit takes longer and longer to load all kinds of entry points - many of which are not used by most programs.

It would be nice to have an alternative initialization that takes extension strings specifying the "required" functionality and "optional" functionality which are intersected with the "available" extension string to limit the extensions queried at runtime.

GLenum glewInitOnly(const char required, const char optional)

For diagnostic purposes it would also be handy to know which required extensions were unavailable, for the purpose of bailing out gracefully.

This would also be useful for testing that a program only uses a specific subset of the API and doesn't have unintended vendor or GPU dependencies.

On the other hand, it would be even better to detect these dependencies at compile-time. Perhaps a set of #defines could be used to selectively enable parts of glew.h and glew.c. This would be nice for shrinking the memory footprint of GLEW, in additional to minimising the initialization time.

It's worth noting that GLEW already supports a "custom" build mode for a specified subset of the known API.



Cancel   Add attachments