Skip to content

Commit

Permalink
Get rid of GLEW
Browse files Browse the repository at this point in the history
OpenGL is now initialized by ImGui embedded loader
  • Loading branch information
aeburriel committed Dec 5, 2021
1 parent c2d546b commit a85baf3
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 19 deletions.
14 changes: 7 additions & 7 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ if (MSVC)
# Volk
target_link_libraries(sdrpp_core PUBLIC volk)

# Glew
find_package(GLEW REQUIRED)
target_link_libraries(sdrpp_core PUBLIC GLEW::GLEW)
# GL
find_package(OpenGL REQUIRED)
target_link_libraries(sdrpp_core PUBLIC OpenGL::GL)

# GLFW3
find_package(glfw3 CONFIG REQUIRED)
Expand All @@ -75,28 +75,28 @@ else()
find_package(PkgConfig)
find_package(OpenGL REQUIRED)

pkg_check_modules(GLEW REQUIRED glew)
pkg_check_modules(GL REQUIRED gl)
pkg_check_modules(FFTW3 REQUIRED fftw3f)
pkg_check_modules(VOLK REQUIRED volk)
pkg_check_modules(GLFW3 REQUIRED glfw3)

target_include_directories(sdrpp_core PUBLIC
${GLEW_INCLUDE_DIRS}
${GL_INCLUDE_DIRS}
${FFTW3_INCLUDE_DIRS}
${GLFW3_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
)

target_link_directories(sdrpp_core PUBLIC
${GLEW_LIBRARY_DIRS}
${GL_LIBRARY_DIRS}
${FFTW3_LIBRARY_DIRS}
${GLFW3_LIBRARY_DIRS}
${VOLK_LIBRARY_DIRS}
)

target_link_libraries(sdrpp_core PUBLIC
${OPENGL_LIBRARIES}
${GLEW_LIBRARIES}
${GL_LIBRARIES}
${FFTW3_LIBRARIES}
${GLFW3_LIBRARIES}
${VOLK_LIBRARIES}
Expand Down
1 change: 0 additions & 1 deletion core/src/credits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ namespace sdrpp_credits {
const char* libraries[] = {
"Dear ImGui (ocornut)",
"fftw3 (fftw.org)",
"glew (Nigel Stewart)",
"glfw (Camilla Löwy)",
"json (nlohmann)",
"spdlog (gabime)",
Expand Down
1 change: 0 additions & 1 deletion core/src/gui/dialogs/loading_screen.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <GL/glew.h>
#include <gui/dialogs/loading_screen.h>
#include <gui/main_window.h>
#include <imgui.h>
Expand Down
1 change: 0 additions & 1 deletion core/src/gui/icons.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <gui/icons.h>
#include <stdint.h>
#include <GL/glew.h>
#include <config.h>
#include <options.h>

Expand Down
5 changes: 4 additions & 1 deletion core/src/gui/icons.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#pragma once
#include <imgui/imgui.h>
#include <GL/glew.h>
#ifdef _WIN32
#include <windows.h>
#endif
#include <GL/gl.h>
#include <string>

namespace icons {
Expand Down
1 change: 0 additions & 1 deletion core/src/gui/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "imgui_impl_glfw.h"
#include "imgui_impl_opengl3.h"
#include <stdio.h>
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <thread>
#include <complex>
Expand Down
5 changes: 4 additions & 1 deletion core/src/gui/widgets/line_push_image.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
#include <imgui_internal.h>
#include <dsp/stream.h>
#include <mutex>
#include <GL/glew.h>
#ifdef _WIN32
#include <windows.h>
#endif
#include <GL/gl.h>

namespace ImGui {
class LinePushImage {
Expand Down
1 change: 0 additions & 1 deletion core/src/gui/widgets/waterfall.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <gui/widgets/waterfall.h>
#include <imgui.h>
#include <imgui_internal.h>
#include <GL/glew.h>
#include <imutils.h>
#include <algorithm>
#include <volk/volk.h>
Expand Down
5 changes: 4 additions & 1 deletion core/src/gui/widgets/waterfall.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
#include <gui/widgets/bandplan.h>
#include <imgui/imgui.h>
#include <imgui/imgui_internal.h>
#include <GL/glew.h>
#ifdef _WIN32
#include <windows.h>
#endif
#include <GL/gl.h>
#include <utils/event.h>

#define WATERFALL_RESOLUTION 1000000
Expand Down
5 changes: 1 addition & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Download the latest release from [the Releases page](https://github.com/Alexandr
Then, run:

```sh
sudo apt install libfftw3-dev libglfw3-dev libglew-dev libvolk2-dev libsoapysdr-dev libairspyhf-dev libiio-dev libad9361-dev librtaudio-dev libhackrf-dev
sudo apt install libfftw3-dev libglfw3-dev libvolk2-dev libsoapysdr-dev libairspyhf-dev libiio-dev libad9361-dev librtaudio-dev libhackrf-dev
sudo dpkg -i sdrpp_debian_amd64.deb
```

Expand Down Expand Up @@ -71,7 +71,6 @@ brew install \
cmake \
codec2 \
fftw \
glew \
glfw \
hackrf \
libbladerf \
Expand Down Expand Up @@ -116,7 +115,6 @@ After this, install the following dependencies using vcpkg:

* fftw3
* glfw3
* glew

You are probably going to build in 64 bit so make sure vcpkg installs the correct versions using `.\vcpkg.exe install <package>:x64-windows`

Expand Down Expand Up @@ -222,7 +220,6 @@ you can disable it using the module parameter listed in the table below
* cmake
* fftw3
* glfw
* glew
* libvolk

Next install dependencies based on the modules you wish to build (See previous step)
Expand Down

0 comments on commit a85baf3

Please sign in to comment.