Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install mamba
uses: mamba-org/provision-with-micromamba@v13
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "glad"]
path = glad
url = https://github.com/Dav1dde/glad.git
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ option(

find_package(xeus-zmq REQUIRED)
find_package(PNG REQUIRED)
find_package(glad REQUIRED)
find_package(glfw3)

find_package(PkgConfig REQUIRED)
pkg_check_modules(octinterp REQUIRED IMPORTED_TARGET GLOBAL octinterp)

add_subdirectory(glad/cmake)
glad_add_library(glad-static STATIC API gl:compatibility=1.1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if I understand, this is where the custom/glue code is generated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes exactly


# Flags =====
include(CheckCXXCompilerFlag)

Expand Down Expand Up @@ -227,7 +229,7 @@ macro(xeus_octave_create_target target_name linkage output_name)
target_link_libraries(
${target_name}
PUBLIC xtl PkgConfig::octinterp
PRIVATE glad::glad glfw PNG::PNG
PRIVATE glfw PNG::PNG glad-static
)
if(XEUS_OCTAVE_USE_SHARED_XEUS)
target_link_libraries(${target_name} PUBLIC xeus-zmq)
Expand Down
1 change: 1 addition & 0 deletions glad
Submodule glad added at d08b1a
2 changes: 1 addition & 1 deletion include/xeus-octave/opengl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#ifndef XEUS_OCTAVE_OPENGL_H
#define XEUS_OCTAVE_OPENGL_H

#include <glad/glad.h>
#include <glad/gl.h>

namespace octave
{
Expand Down
2 changes: 1 addition & 1 deletion src/tk_notebook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ glfw_graphics_toolkit::glfw_graphics_toolkit(std::string const& nm) : octave::ba

glfwMakeContextCurrent(window);

gladLoadGLLoader(reinterpret_cast<GLADloadproc>(glfwGetProcAddress));
gladLoadGL(reinterpret_cast<GLADloadfunc>(glfwGetProcAddress));

#ifndef NDEBUG
std::clog << "OpenGL vendor: " << glGetString(GL_VENDOR) << '\n';
Expand Down