remove glew if using imgui drawing
This commit is contained in:
parent
d90a2bc381
commit
6d1d8857fc
@ -137,7 +137,6 @@ if(EnableVisuals)
|
||||
endif()
|
||||
target_include_directories(cathook PRIVATE include/visual)
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(GLEW REQUIRED)
|
||||
if(ExternalDrawing)
|
||||
add_subdirectory(external/libxoverlay)
|
||||
target_link_libraries(cathook xoverlay)
|
||||
@ -147,7 +146,10 @@ if(EnableVisuals)
|
||||
if (EnableGlezDrawing)
|
||||
target_link_libraries(cathook glez)
|
||||
endif()
|
||||
target_link_libraries(cathook ${GLEW_LIBRARIES})
|
||||
if (EnableGlezDrawing)
|
||||
find_package(GLEW REQUIRED)
|
||||
target_link_libraries(cathook ${GLEW_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
configure_file(include/config.h.in ${CMAKE_SOURCE_DIR}/include/config.h @ONLY)
|
||||
|
@ -572,7 +572,7 @@ void InitGL()
|
||||
xoverlay_draw_end();
|
||||
#else
|
||||
#if ENABLE_IMGUI_DRAWING
|
||||
glewInit();
|
||||
// glewInit();
|
||||
im_renderer::init();
|
||||
#elif ENABLE_GLEZ_DRAWING || ENABLE_IMGUI_DRAWING
|
||||
glClearColor(1.0, 0.0, 0.0, 0.5);
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
#include <GL/glew.h>
|
||||
//#include <GL/glew.h>
|
||||
#include "visual/imgui/imgui_impl.h"
|
||||
#include "visual/drawing.hpp"
|
||||
#include "visual/imgui/imgui.h"
|
||||
@ -38,7 +38,7 @@ void ImGui_Impl_Render(ImDrawData *draw_data)
|
||||
glPushAttrib(GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT | GL_TRANSFORM_BIT);
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE);
|
||||
// glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE);
|
||||
glDisable(GL_CULL_FACE);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDisable(GL_LIGHTING);
|
||||
|
Reference in New Issue
Block a user