stevenlovegrove / Pangolin

Pangolin is a lightweight portable rapid development library for managing OpenGL display / interaction and abstracting video input.
MIT License
2.39k stars 854 forks source link

Lots of gl function was not declared #948

Closed oOo-w closed 2 months ago

oOo-w commented 2 months ago

I am using the Pangolin-0.9.2 in Ubuntu24.04

The installation of Pangolin went smoothly. However, when I used Pangolin, there were many instances where GL functions were undefined.

How can I solve this?

The error messages are as follows:

[ 50%] Building CXX object pangolin/CMakeFiles/testPangolin.dir/testPangolin.cpp.o
In file included from /usr/local/include/pangolin/gl/gl.h:324,
                 from /usr/local/include/pangolin/handler/handler.h:31,
                 from /usr/local/include/pangolin/display/widgets.h:32,
                 from /usr/local/include/pangolin/pangolin.h:40,
                 from /home/chaibowen/code/temp/pangolin/testPangolin.cpp:2:
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlTexture::CopyFrom(const pangolin::GlTexture&)’:
/usr/local/include/pangolin/gl/gl.hpp:348:5: error: ‘glCopyImageSubDataNV’ was not declared in this scope
  348 |     glCopyImageSubDataNV(tex.tid, GL_TEXTURE_2D, 0, 0, 0, 0,
      |     ^~~~~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlRenderBuffer::Reinitialise(GLint, GLint, GLint)’:
/usr/local/include/pangolin/gl/gl.hpp:522:9: error: ‘glDeleteRenderbuffersEXT’ was not declared in this scope
  522 |         glDeleteRenderbuffersEXT(1, &rbid);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/gl.hpp:527:5: error: ‘glGenRenderbuffers’ was not declared in this scope; did you mean ‘GlRenderBuffer’?
  527 |     glGenRenderbuffers(1, &rbid);
      |     ^~~~~~~~~~~~~~~~~~
      |     GlRenderBuffer
/usr/local/include/pangolin/gl/gl.hpp:528:5: error: ‘glBindRenderbuffer’ was not declared in this scope; did you mean ‘GlRenderBuffer’?
  528 |     glBindRenderbuffer(GL_RENDERBUFFER_EXT, rbid);
      |     ^~~~~~~~~~~~~~~~~~
      |     GlRenderBuffer
/usr/local/include/pangolin/gl/gl.hpp:529:5: error: ‘glRenderbufferStorage’ was not declared in this scope
  529 |     glRenderbufferStorage(GL_RENDERBUFFER_EXT, internal_format, width, height);
      |     ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/gl.hpp: In destructor ‘pangolin::GlRenderBuffer::~GlRenderBuffer()’:
/usr/local/include/pangolin/gl/gl.hpp:536:9: error: ‘glDeleteRenderbuffers’ was not declared in this scope
  536 |         glDeleteRenderbuffers(1, &rbid);
      |         ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/gl.hpp: In destructor ‘pangolin::GlFramebuffer::~GlFramebuffer()’:
/usr/local/include/pangolin/gl/gl.hpp:585:9: error: ‘glDeleteFramebuffers’ was not declared in this scope
  585 |         glDeleteFramebuffers(1, &fbid);
      |         ^~~~~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/gl.hpp: In constructor ‘pangolin::GlFramebuffer::GlFramebuffer(pangolin::GlTexture&)’:
/usr/local/include/pangolin/gl/gl.hpp:592:5: error: ‘glGenFramebuffers’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  592 |     glGenFramebuffers(1, &fbid);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/usr/local/include/pangolin/gl/gl.hpp: In constructor ‘pangolin::GlFramebuffer::GlFramebuffer(pangolin::GlTexture&, pangolin::GlRenderBuffer&)’:
/usr/local/include/pangolin/gl/gl.hpp:600:5: error: ‘glGenFramebuffers’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  600 |     glGenFramebuffers(1, &fbid);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/usr/local/include/pangolin/gl/gl.hpp: In constructor ‘pangolin::GlFramebuffer::GlFramebuffer(pangolin::GlTexture&, pangolin::GlTexture&, pangolin::GlRenderBuffer&)’:
/usr/local/include/pangolin/gl/gl.hpp:609:5: error: ‘glGenFramebuffers’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  609 |     glGenFramebuffers(1, &fbid);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/usr/local/include/pangolin/gl/gl.hpp: In constructor ‘pangolin::GlFramebuffer::GlFramebuffer(pangolin::GlTexture&, pangolin::GlTexture&, pangolin::GlTexture&, pangolin::GlRenderBuffer&)’:
/usr/local/include/pangolin/gl/gl.hpp:619:5: error: ‘glGenFramebuffers’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  619 |     glGenFramebuffers(1, &fbid);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/usr/local/include/pangolin/gl/gl.hpp: In constructor ‘pangolin::GlFramebuffer::GlFramebuffer(pangolin::GlTexture&, pangolin::GlTexture&, pangolin::GlTexture&, pangolin::GlTexture&, pangolin::GlRenderBuffer&)’:
/usr/local/include/pangolin/gl/gl.hpp:630:5: error: ‘glGenFramebuffers’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  630 |     glGenFramebuffers(1, &fbid);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlFramebuffer::Bind() const’:
/usr/local/include/pangolin/gl/gl.hpp:641:5: error: ‘glBindFramebuffer’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  641 |     glBindFramebuffer(GL_FRAMEBUFFER_EXT, fbid);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/usr/local/include/pangolin/gl/gl.hpp:642:5: error: ‘glDrawBuffers’ was not declared in this scope; did you mean ‘glDrawBuffer’?
  642 |     glDrawBuffers( attachments, attachment_buffers );
      |     ^~~~~~~~~~~~~
      |     glDrawBuffer
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlFramebuffer::Reinitialise()’:
/usr/local/include/pangolin/gl/gl.hpp:648:9: error: ‘glDeleteFramebuffers’ was not declared in this scope
  648 |         glDeleteFramebuffers(1, &fbid);
      |         ^~~~~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/gl.hpp:650:5: error: ‘glGenFramebuffers’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  650 |     glGenFramebuffers(1, &fbid);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlFramebuffer::Unbind() const’:
/usr/local/include/pangolin/gl/gl.hpp:655:5: error: ‘glDrawBuffers’ was not declared in this scope; did you mean ‘glDrawBuffer’?
  655 |     glDrawBuffers( 1, attachment_buffers );
      |     ^~~~~~~~~~~~~
      |     glDrawBuffer
/usr/local/include/pangolin/gl/gl.hpp:656:5: error: ‘glBindFramebuffer’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  656 |     glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘GLenum pangolin::GlFramebuffer::AttachColour(pangolin::GlTexture&)’:
/usr/local/include/pangolin/gl/gl.hpp:664:5: error: ‘glBindFramebuffer’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  664 |     glBindFramebuffer(GL_FRAMEBUFFER_EXT, fbid);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/usr/local/include/pangolin/gl/gl.hpp:665:5: error: ‘glFramebufferTexture2D’ was not declared in this scope
  665 |     glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, color_attachment, GL_TEXTURE_2D, tex.tid, 0);
      |     ^~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlFramebuffer::AttachDepth(pangolin::GlRenderBuffer&)’:
/usr/local/include/pangolin/gl/gl.hpp:676:5: error: ‘glBindFramebuffer’ was not declared in this scope; did you mean ‘GlFramebuffer’?
  676 |     glBindFramebuffer(GL_FRAMEBUFFER_EXT, fbid);
      |     ^~~~~~~~~~~~~~~~~
      |     GlFramebuffer
/usr/local/include/pangolin/gl/gl.hpp:678:5: error: ‘glFramebufferRenderbuffer’ was not declared in this scope
  678 |     glFramebufferRenderbuffer(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, rb.rbid);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlBufferData::Free()’:
/usr/local/include/pangolin/gl/gl.hpp:734:9: error: ‘glDeleteBuffers’ was not declared in this scope; did you mean ‘glSelectBuffer’?
  734 |         glDeleteBuffers(1, &bo);
      |         ^~~~~~~~~~~~~~~
      |         glSelectBuffer
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlBufferData::Reinitialise(pangolin::GlBufferType, GLsizeiptr, GLenum, const void*)’:
/usr/local/include/pangolin/gl/gl.hpp:751:9: error: ‘glGenBuffers’ was not declared in this scope; did you mean ‘glReadBuffer’?
  751 |         glGenBuffers(1, &bo);
      |         ^~~~~~~~~~~~
      |         glReadBuffer
/usr/local/include/pangolin/gl/gl.hpp:759:5: error: ‘glBufferData’ was not declared in this scope; did you mean ‘GlBufferData’?
  759 |     glBufferData(buffer_type, size_bytes, data, gluse);
      |     ^~~~~~~~~~~~
      |     GlBufferData
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlBufferData::Bind() const’:
/usr/local/include/pangolin/gl/gl.hpp:765:5: error: ‘glBindBuffer’ was not declared in this scope; did you mean ‘glReadBuffer’?
  765 |     glBindBuffer(buffer_type, bo);
      |     ^~~~~~~~~~~~
      |     glReadBuffer
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlBufferData::Unbind() const’:
/usr/local/include/pangolin/gl/gl.hpp:770:5: error: ‘glBindBuffer’ was not declared in this scope; did you mean ‘glReadBuffer’?
  770 |     glBindBuffer(buffer_type, 0);
      |     ^~~~~~~~~~~~
      |     glReadBuffer
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlBufferData::Upload(const GLvoid*, GLsizeiptr, GLintptr)’:
/usr/local/include/pangolin/gl/gl.hpp:780:5: error: ‘glBufferSubData’ was not declared in this scope; did you mean ‘GlBufferData’?
  780 |     glBufferSubData(buffer_type,offset,size_bytes,data);
      |     ^~~~~~~~~~~~~~~
      |     GlBufferData
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlBufferData::Download(GLvoid*, GLsizeiptr, GLintptr) const’:
/usr/local/include/pangolin/gl/gl.hpp:787:5: error: ‘glGetBufferSubData’ was not declared in this scope; did you mean ‘GlBufferData’?
  787 |     glGetBufferSubData(buffer_type, offset, size_bytes, data);
      |     ^~~~~~~~~~~~~~~~~~
      |     GlBufferData
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlBuffer::Resize(GLuint)’:
/usr/local/include/pangolin/gl/gl.hpp:862:9: error: ‘glGetBufferSubData’ was not declared in this scope; did you mean ‘GlBufferData’?
  862 |         glGetBufferSubData(buffer_type, 0, backup_size_bytes, backup);
      |         ^~~~~~~~~~~~~~~~~~
      |         GlBufferData
/usr/local/include/pangolin/gl/gl.hpp:863:9: error: ‘glBufferData’ was not declared in this scope; did you mean ‘GlBufferData’?
  863 |         glBufferData(buffer_type, new_num_elements*GlDataTypeBytes(datatype)*count_per_element, 0, gluse);
      |         ^~~~~~~~~~~~
      |         GlBufferData
/usr/local/include/pangolin/gl/gl.hpp:864:9: error: ‘glBufferSubData’ was not declared in this scope; did you mean ‘GlBufferData’?
  864 |         glBufferSubData(buffer_type, 0, backup_size_bytes, backup);
      |         ^~~~~~~~~~~~~~~
      |         GlBufferData
/usr/local/include/pangolin/gl/gl.hpp: In constructor ‘pangolin::GlVertexArrayObject::GlVertexArrayObject()’:
/usr/local/include/pangolin/gl/gl.hpp:969:5: error: ‘glGenVertexArrays’ was not declared in this scope
  969 |     glGenVertexArrays(1, &vao);
      |     ^~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/gl.hpp: In destructor ‘pangolin::GlVertexArrayObject::~GlVertexArrayObject()’:
/usr/local/include/pangolin/gl/gl.hpp:974:5: error: ‘glDeleteVertexArrays’ was not declared in this scope
  974 |     glDeleteVertexArrays(1, &vao);
      |     ^~~~~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlVertexArrayObject::Bind() const’:
/usr/local/include/pangolin/gl/gl.hpp:979:5: error: ‘glBindVertexArray’ was not declared in this scope
  979 |     glBindVertexArray(vao);
      |     ^~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlVertexArrayObject::Unbind() const’:
/usr/local/include/pangolin/gl/gl.hpp:985:5: error: ‘glBindVertexArray’ was not declared in this scope
  985 |     glBindVertexArray(0);
      |     ^~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlVertexArrayObject::AddVertexAttrib(GLuint, const pangolin::GlBuffer&, size_t, size_t, GLboolean)’:
/usr/local/include/pangolin/gl/gl.hpp:993:5: error: ‘glVertexAttribPointer’ was not declared in this scope; did you mean ‘glVertexPointer’?
  993 |     glVertexAttribPointer(attrib_location, bo.count_per_element, bo.datatype, normalized, stride_bytes, (void*)offset_bytes);
      |     ^~~~~~~~~~~~~~~~~~~~~
      |     glVertexPointer
/usr/local/include/pangolin/gl/gl.hpp:995:5: error: ‘glEnableVertexAttribArray’ was not declared in this scope
  995 |     glEnableVertexAttribArray(attrib_location);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/pangolin/gl/glsl.h:232,
                 from /usr/local/include/pangolin/plot/plotter.h:37,
                 from /usr/local/include/pangolin/pangolin.h:48:
/usr/local/include/pangolin/gl/glsl.hpp: In function ‘bool pangolin::IsLinkSuccessPrintLog(GLhandleARB)’:
/usr/local/include/pangolin/gl/glsl.hpp:19:5: error: ‘glGetProgramiv’ was not declared in this scope
   19 |     glGetProgramiv(prog, GL_LINK_STATUS, &status);
      |     ^~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp:25:9: error: ‘glGetProgramInfoLog’ was not declared in this scope
   25 |         glGetProgramInfoLog(prog, PROGRAM_LOG_MAX_LEN, &len, infolog);
      |         ^~~~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In function ‘bool pangolin::IsCompileSuccessPrintLog(GLhandleARB, const std::string&, const std::string&)’:
/usr/local/include/pangolin/gl/glsl.hpp:51:5: error: ‘glGetShaderiv’ was not declared in this scope
   51 |     glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
      |     ^~~~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp:57:9: error: ‘glGetShaderInfoLog’ was not declared in this scope
   57 |         glGetShaderInfoLog(shader, SHADER_LOG_MAX_LEN, &len, infolog);
      |         ^~~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In destructor ‘pangolin::GlSlProgram::~GlSlProgram()’:
/usr/local/include/pangolin/gl/glsl.hpp:88:9: error: ‘glDeleteProgram’ was not declared in this scope; did you mean ‘GlSlProgram’?
   88 |         glDeleteProgram(prog);
      |         ^~~~~~~~~~~~~~~
      |         GlSlProgram
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘bool pangolin::GlSlProgram::AddPreprocessedShader(pangolin::GlSlShaderType, const std::string&, const std::string&)’:
/usr/local/include/pangolin/gl/glsl.hpp:108:16: error: ‘glCreateProgram’ was not declared in this scope
  108 |         prog = glCreateProgram();
      |                ^~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp:111:26: error: ‘glCreateShader’ was not declared in this scope; did you mean ‘GlSlVertexShader’?
  111 |     GLhandleARB shader = glCreateShader(shader_type);
      |                          ^~~~~~~~~~~~~~
      |                          GlSlVertexShader
/usr/local/include/pangolin/gl/glsl.hpp:113:5: error: ‘glShaderSource’ was not declared in this scope
  113 |     glShaderSource(shader, 1, &source, NULL);
      |     ^~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp:114:5: error: ‘glCompileShader’ was not declared in this scope; did you mean ‘GlSlComputeShader’?
  114 |     glCompileShader(shader);
      |     ^~~~~~~~~~~~~~~
      |     GlSlComputeShader
/usr/local/include/pangolin/gl/glsl.hpp:117:9: error: ‘glAttachShader’ was not declared in this scope
  117 |         glAttachShader(prog, shader);
      |         ^~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::ClearShaders()’:
/usr/local/include/pangolin/gl/glsl.hpp:229:9: error: ‘glDetachShader’ was not declared in this scope
  229 |         glDetachShader(prog, shaders[i]);
      |         ^~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp:230:9: error: ‘glDeleteShader’ was not declared in this scope; did you mean ‘GlSlVertexShader’?
  230 |         glDeleteShader(shaders[i]);
      |         ^~~~~~~~~~~~~~
      |         GlSlVertexShader
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘bool pangolin::GlSlProgram::Link()’:
/usr/local/include/pangolin/gl/glsl.hpp:365:5: error: ‘glLinkProgram’ was not declared in this scope; did you mean ‘GlSlProgram’?
  365 |     glLinkProgram(prog);
      |     ^~~~~~~~~~~~~
      |     GlSlProgram
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::Bind()’:
/usr/local/include/pangolin/gl/glsl.hpp:372:5: error: ‘glUseProgram’ was not declared in this scope; did you mean ‘GlSlProgram’?
  372 |     glUseProgram(prog);
      |     ^~~~~~~~~~~~
      |     GlSlProgram
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::SaveBind()’:
/usr/local/include/pangolin/gl/glsl.hpp:378:5: error: ‘glUseProgram’ was not declared in this scope; did you mean ‘GlSlProgram’?
  378 |     glUseProgram(prog);
      |     ^~~~~~~~~~~~
      |     GlSlProgram
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::Unbind()’:
/usr/local/include/pangolin/gl/glsl.hpp:383:5: error: ‘glUseProgram’ was not declared in this scope; did you mean ‘GlSlProgram’?
  383 |     glUseProgram(prev_prog);
      |     ^~~~~~~~~~~~
      |     GlSlProgram
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘GLint pangolin::GlSlProgram::GetAttributeHandle(const std::string&)’:
/usr/local/include/pangolin/gl/glsl.hpp:388:20: error: ‘glGetAttribLocation’ was not declared in this scope
  388 |     GLint handle = glGetAttribLocation(prog, name.c_str());
      |                    ^~~~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘GLint pangolin::GlSlProgram::GetUniformHandle(const std::string&)’:
/usr/local/include/pangolin/gl/glsl.hpp:395:20: error: ‘glGetUniformLocation’ was not declared in this scope
  395 |     GLint handle = glGetUniformLocation(prog, name.c_str());
      |                    ^~~~~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::SetUniform(const std::string&, int)’:
/usr/local/include/pangolin/gl/glsl.hpp:402:5: error: ‘glUniform1i’ was not declared in this scope
  402 |     glUniform1i( GetUniformHandle(name), x);
      |     ^~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::SetUniform(const std::string&, int, int)’:
/usr/local/include/pangolin/gl/glsl.hpp:407:5: error: ‘glUniform2i’ was not declared in this scope
  407 |     glUniform2i( GetUniformHandle(name), x1, x2);
      |     ^~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::SetUniform(const std::string&, int, int, int)’:
/usr/local/include/pangolin/gl/glsl.hpp:412:5: error: ‘glUniform3i’ was not declared in this scope
  412 |     glUniform3i( GetUniformHandle(name), x1, x2, x3);
      |     ^~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::SetUniform(const std::string&, int, int, int, int)’:
/usr/local/include/pangolin/gl/glsl.hpp:417:5: error: ‘glUniform4i’ was not declared in this scope
  417 |     glUniform4i( GetUniformHandle(name), x1, x2, x3, x4);
      |     ^~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::SetUniform(const std::string&, float)’:
/usr/local/include/pangolin/gl/glsl.hpp:422:5: error: ‘glUniform1f’ was not declared in this scope
  422 |     glUniform1f( GetUniformHandle(name), f);
      |     ^~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::SetUniform(const std::string&, float, float)’:
/usr/local/include/pangolin/gl/glsl.hpp:427:5: error: ‘glUniform2f’ was not declared in this scope
  427 |     glUniform2f( GetUniformHandle(name), f1,f2);
      |     ^~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::SetUniform(const std::string&, float, float, float)’:
/usr/local/include/pangolin/gl/glsl.hpp:432:5: error: ‘glUniform3f’ was not declared in this scope
  432 |     glUniform3f( GetUniformHandle(name), f1,f2,f3);
      |     ^~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::SetUniform(const std::string&, float, float, float, float)’:
/usr/local/include/pangolin/gl/glsl.hpp:437:5: error: ‘glUniform4f’ was not declared in this scope
  437 |     glUniform4f( GetUniformHandle(name), f1,f2,f3,f4);
      |     ^~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::SetUniform(const std::string&, double)’:
/usr/local/include/pangolin/gl/glsl.hpp:442:5: error: ‘glUniform1d’ was not declared in this scope
  442 |     glUniform1d( GetUniformHandle(name), f);
      |     ^~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::SetUniform(const std::string&, double, double)’:
/usr/local/include/pangolin/gl/glsl.hpp:447:5: error: ‘glUniform2d’ was not declared in this scope
  447 |     glUniform2d( GetUniformHandle(name), f1,f2);
      |     ^~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::SetUniform(const std::string&, double, double, double)’:
/usr/local/include/pangolin/gl/glsl.hpp:452:5: error: ‘glUniform3d’ was not declared in this scope
  452 |     glUniform3d( GetUniformHandle(name), f1,f2,f3);
      |     ^~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::SetUniform(const std::string&, double, double, double, double)’:
/usr/local/include/pangolin/gl/glsl.hpp:457:5: error: ‘glUniform4d’ was not declared in this scope
  457 |     glUniform4d( GetUniformHandle(name), f1,f2,f3,f4);
      |     ^~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::SetUniform(const std::string&, pangolin::Colour)’:
/usr/local/include/pangolin/gl/glsl.hpp:462:5: error: ‘glUniform4f’ was not declared in this scope
  462 |     glUniform4f( GetUniformHandle(name), c.r, c.g, c.b, c.a);
      |     ^~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::SetUniform(const std::string&, const pangolin::OpenGlMatrix&)’:
/usr/local/include/pangolin/gl/glsl.hpp:472:5: error: ‘glUniformMatrix4fv’ was not declared in this scope
  472 |     glUniformMatrix4fv( GetUniformHandle(name), 1, GL_FALSE, m);
      |     ^~~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::BindPangolinDefaultAttribLocationsAndLink()’:
/usr/local/include/pangolin/gl/glsl.hpp:529:5: error: ‘glBindAttribLocation’ was not declared in this scope
  529 |     glBindAttribLocation(prog, DEFAULT_LOCATION_POSITION, DEFAULT_NAME_POSITION);
      |     ^~~~~~~~~~~~~~~~~~~~
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘GLint pangolin::GlSlProgram::GetProgramResourceIndex(const std::string&)’:
/usr/local/include/pangolin/gl/glsl.hpp:539:12: error: ‘glGetProgramResourceIndex’ was not declared in this scope; did you mean ‘GetProgramResourceIndex’?
  539 |     return glGetProgramResourceIndex(prog, GL_SHADER_STORAGE_BLOCK, name.c_str());
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
      |            GetProgramResourceIndex
/usr/local/include/pangolin/gl/glsl.hpp: In member function ‘void pangolin::GlSlProgram::SetShaderStorageBlock(const std::string&, const int&)’:
/usr/local/include/pangolin/gl/glsl.hpp:544:5: error: ‘glShaderStorageBlockBinding’ was not declared in this scope
  544 |     glShaderStorageBlockBinding(prog, GetProgramResourceIndex(name), bindingIndex);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
gmake[3]: *** [pangolin/CMakeFiles/testPangolin.dir/build.make:76:pangolin/CMakeFiles/testPangolin.dir/testPangolin.cpp.o] 错误 1
gmake[2]: *** [CMakeFiles/Makefile2:273:pangolin/CMakeFiles/testPangolin.dir/all] 错误 2
gmake[1]: *** [CMakeFiles/Makefile2:280:pangolin/CMakeFiles/testPangolin.dir/rule] 错误 2
gmake: *** [Makefile:176:testPangolin] 错误 2

Many thanks for your help in advance!

christian-rauch commented 2 months ago

It looks like you additionally have to include and link OpenGL to your project. Do you have a reproducible example of this?

oOo-w commented 2 months ago

I have solved the issue. I just forgot to link the libraries after finding the package. I apologize for my carelessness. Thank you for your patient response.