Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of GLEW #547

Closed
pjurkas opened this issue Jul 5, 2018 · 11 comments
Closed

Get rid of GLEW #547

pjurkas opened this issue Jul 5, 2018 · 11 comments
Labels
good first issue Standard label for new developers to locate good issues to tackle to learn about OCIO development.

Comments

@pjurkas
Copy link
Contributor

pjurkas commented Jul 5, 2018

File src/lang-glsl/glsl.cpp uses GLEW. It does not call glewInit(). We have to call it from our main to prevent crashes. Would it be possible to get rid of GLEW?

This worked for me on Linux:

diff --git a/src/lang-glsl/glsl.cpp b/src/lang-glsl/glsl.cpp
index 44d1997..3cffde8 100644
--- a/src/lang-glsl/glsl.cpp
+++ b/src/lang-glsl/glsl.cpp
@@ -33,9 +33,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #elif _WIN32
 #include <GL/glew.h>
 #else
-#include <GL/glew.h>
+#define GL_GLEXT_PROTOTYPES
 #include <GL/gl.h>
-#include <GL/glext.h>
+#include <GL/glu.h>
 #endif
@scoopxyz scoopxyz added the good first issue Standard label for new developers to locate good issues to tackle to learn about OCIO development. label Sep 16, 2018
@YashAgrawal0
Copy link
Contributor

Is this issue still open?

@doug-walker
Copy link
Collaborator

doug-walker commented Mar 6, 2020

@YashAgrawal0, yes this issue is still open.

I'll also mention that we recently received a suggestion to replace GLX with EGL. That would allow us to run GPU tests without a GRID license. This might also indirectly remove the need for GLEW, but it's probably a harder task.

@hodoulp, could answer other questions on this.

@hodoulp
Copy link
Member

hodoulp commented Mar 9, 2020

@YashAgrawal0 The defect is still open and relevant.

As mentioned by @doug-walker, the EGL option could also be a very interesting investigation/fix.

@MOFD308
Copy link
Contributor

MOFD308 commented Mar 12, 2020

If I want to take "Restore Java bindings" as my Google Summer of Code project, can any members tell me where to start? Thanks!

@michdolan
Copy link
Collaborator

Hi @MOFD308 - thanks for your interest in our GSoC involvement. I've created a new issue for the Java bindings where we can discuss this:

#950

@ChinYing-Li
Copy link
Contributor

Hi, is this issue still open? OP's reason for wanting to get rid of GLEW is to prevent crashes when glewInit() isn't called. As an alternative, libepoxy requires no initialization code.
I can also investigate the possibility of "replacing GLX with EGL". Any suggestions?

@hodoulp
Copy link
Member

hodoulp commented Jun 8, 2020

Hi @ChinYing-Li,
The defect is still open which could be an interesting 'project' if you have a linux machine.

But it represents two works. The first one is get rid off GLEW for linux platform only (as explained by @pjurkas). The second is to improve the GPU unit test framework to run on headless machines and the use of EGL library could allow that. It should be two pull requests as the second work needs some investigations & validations.

@ChinYing-Li
Copy link
Contributor

Hi @hodoulp ,
Thank you for explaining. I think I can start working on the second part, since @doug-walker mentioned that this might remove the need for GLEW, though I haven't investigated deep into this issue yet. What do you think?

@hodoulp
Copy link
Member

hodoulp commented Jun 11, 2020

Agree. That's part of the investigation around EGL.

@ChinYing-Li
Copy link
Contributor

ChinYing-Li commented Jun 17, 2020

Since OpenColorIO need a OpenGL loader, shall we go for custom gl loader implementation? Or shall we replace glew with a loader library that does not require init()?
Reference: 3dfxdev/EDGE#10

@doug-walker
Copy link
Collaborator

I believe this was fixed by PR #1047. Closing this issue. If this is still a problem for anyone, please let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Standard label for new developers to locate good issues to tackle to learn about OCIO development.
Projects
None yet
Development

No branches or pull requests

8 participants