Skip to content

Commit

Permalink
Remove GLEW remains on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
vanfanel committed Feb 10, 2024
1 parent 825bd12 commit 7dc2fc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion extern/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ endif()

if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
find_package(GLEW REQUIRED)
target_link_libraries(ImGui PUBLIC opengl32 GLEW::GLEW)
target_link_libraries(ImGui PUBLIC opengl32)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
find_package(GLEW REQUIRED)
target_link_libraries(ImGui PUBLIC ${OPENGL_opengl_LIBRARY} GLEW::GLEW)
Expand Down
9 changes: 2 additions & 7 deletions src/graphic/Fast3D/gfx_opengl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@

#ifdef _MSC_VER
#include <SDL2/SDL.h>
// #define GL_GLEXT_PROTOTYPES 1
#include <GL/glew.h>
#define GL_GLEXT_PROTOTYPES 1
#include <SDL2/SDL_opengl.h>
#elif FOR_WINDOWS
#include <GL/glew.h>
#include "SDL.h"
#define GL_GLEXT_PROTOTYPES 1
#include "SDL_opengl.h"
Expand Down Expand Up @@ -846,10 +845,6 @@ static void gfx_opengl_draw_triangles(float buf_vbo[], size_t buf_vbo_len, size_
}

static void gfx_opengl_init(void) {
#if !defined(__SWITCH__) && !defined(__linux__)
glewInit();
#endif

glGenBuffers(1, &opengl_vbo);
glBindBuffer(GL_ARRAY_BUFFER, opengl_vbo);

Expand Down

0 comments on commit 7dc2fc7

Please sign in to comment.