Benefits from manual function loading.

Started by
4 comments, last by haegarr 8 years, 3 months ago

So I have the goal of learning and implementing OpenGL4.3 (as well as ES 3.0) in my project as my Linux, Android, IOS, and OSX rendering engine. I was wondering if there was any benefit to manually loading functions for OpenGL rather than using a library like GLEW or similar.

Advertisement

Maybe less overhead, but I see no advantage in developing your own library.

In the end you would like to fully opperate openGL with its extensions, these library help you write rendering code rather than focusing on managing function pointers.


. I was wondering if there was any benefit to manually loading functions for OpenGL rather than using a library like GLEW or similar.
If your goal is to waste your time, then that would be one benefit.

Use a lib: GLFW, GLEW, SMFL, SDL, etc. OpenGL is hard enough as it is, you don't need to artificially create more complexity around it.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

Maybe less overhead, but I see no advantage in developing your own library.

In the end you would like to fully opperate openGL with its extensions, these library help you write rendering code rather than focusing on managing function pointers.


. I was wondering if there was any benefit to manually loading functions for OpenGL rather than using a library like GLEW or similar.
If your goal is to waste your time, then that would be one benefit.

Use a lib: GLFW, GLEW, SMFL, SDL, etc. OpenGL is hard enough as it is, you don't need to artificially create more complexity around it.

Fair enough. Thanks for the clarification people.

It might be worth doing it yourself if you only need a few functions.

Interested in Fractals? Check out my App, Fractal Scout, free on the Google Play store.

Well, I'm using manual linking and static linking. The majority is statically linked. This is possible because I have a dynamic wrapper library (implementing a specific graphic sub-system) for each supported external graphics API, e.g. one for OpenGL3 and one for OpenGL4. Each one expected a defined set of minimum functionality which is statically linked. Any additional functionality is linked either weakly or even manually (this are relatively few functions). Since own libraries are tried to be loaded manually during the program start-up phase, a policy like "try loading the highest supported version first, then the next lower version, then … until the first successful load or else finally fail" is implemented.

Without that static linking, however, I would use one of the mentioned wrappers.

This topic is closed to new replies.

Advertisement