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

Polyscope OpenGL Error #1

Closed
amiltonwong opened this issue Feb 13, 2021 · 3 comments
Closed

Polyscope OpenGL Error #1

amiltonwong opened this issue Feb 13, 2021 · 3 comments

Comments

@amiltonwong
Copy link

Hi, all,

I've built the project simplicial-complex-operators without error. However, when I run the main executable to display the mesh file. Error message such as Polyscope OpenGL Error! Type: Invalid enum appears. Any hints to solve this issue? THX!

root@milton-PC:/data/code14/ddg-exercises/projects/simplicial-complex-operators/build# ./bin/main ../../../input/disk.obj 
[polyscope] Backend: openGL3_glfw -- Loaded openGL version: 3.3 (Core Profile) Mesa 18.0.5
[polyscope] Polyscope OpenGL Error!  Type: Invalid enum
GLError() after shader compilation! Program text:

      
// tag ${ GLSL_VERSION }$
// from rule: GLSL_VERSION
#version 330 core

      in vec3 a_position;
      out vec2 tCoord;

      void main()
      {
          tCoord = (a_position.xy+vec2(1.0,1.0))/2.0;
          gl_Position = vec4(a_position,1.);
      }

terminate called after throwing an instance of 'std::runtime_error'
  what():  OpenGl error occurred. Text: Invalid enum
Aborted (core dumped)

P.S. My system is ubuntu 16.04.7. gcc/g++ already upgraded to 7.5 version.

@nmwsharp
Copy link

Hi! Thanks for letting us know, I'm sure we can get this figured out.

Is see that you're using the mesa (open-source) video card drivers on Ubuntu. If you just want to get things working as quick as possible, switching to using the NVIDIA drivers will likely do the trick.

HOWEVER, this code should work just fine on mesa drivers as well! So something definitely up. It's been tested a decent amount with mesa, so I'm not sure what's going on. If you're willing, we can do a little debugging and see what may be going on. It's a good opportunity for us to fix issues in the library.

First, if you haven't already, can you try again compiling in debug mode (delete build directory, rebuild with cmake -DCMAKE_BUILD_TYPE=Debug ..), and let us know if you get the same error? This will enable additional sanity checks that might help isolate the issue.

@amiltonwong
Copy link
Author

amiltonwong commented Feb 14, 2021

@nmwsharp , thanks a lot for your help :)
It works after rebuilding it using cmake -DCMAKE_BUILD_TYPE=Debug .. . The GUI comes out without error.

@nmwsharp
Copy link

Ok! I kinda doubt that that fixed the underlying issue, but if you're not seeing any problems right now then I guess that's good news.

Please feel free to reopen here if/when you see other issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants