mirror of
https://github.com/ggerganov/ggwave.git
synced 2026-04-17 19:36:00 +08:00
ggwave-gui : wip file sharing support
This commit is contained in:
1
examples/third-party/CMakeLists.txt
vendored
1
examples/third-party/CMakeLists.txt
vendored
@@ -2,3 +2,4 @@ if (NOT EMSCRIPTEN)
|
||||
endif()
|
||||
add_subdirectory(imtui)
|
||||
add_subdirectory(imgui)
|
||||
add_subdirectory(ggsock)
|
||||
|
||||
1
examples/third-party/ggsock
vendored
Submodule
1
examples/third-party/ggsock
vendored
Submodule
Submodule examples/third-party/ggsock added at cf340425dc
@@ -17,18 +17,16 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
ImGuiContext* ImGui_Init(SDL_Window* window, SDL_GLContext gl_context) {
|
||||
bool ImGui_PreInit() {
|
||||
// Decide GL+GLSL versions
|
||||
#if __APPLE__
|
||||
// GL 3.2 Core + GLSL 150
|
||||
const char* glsl_version = "#version 150";
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG); // Always required on Mac
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
|
||||
#else
|
||||
// GL 3.0 + GLSL 130
|
||||
const char* glsl_version = "#version 130";
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
|
||||
@@ -40,6 +38,19 @@ ImGuiContext* ImGui_Init(SDL_Window* window, SDL_GLContext gl_context) {
|
||||
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
|
||||
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
ImGuiContext* ImGui_Init(SDL_Window* window, SDL_GLContext gl_context) {
|
||||
// Decide GL+GLSL versions
|
||||
#if __APPLE__
|
||||
// GL 3.2 Core + GLSL 150
|
||||
const char* glsl_version = "#version 150";
|
||||
#else
|
||||
// GL 3.0 + GLSL 130
|
||||
const char* glsl_version = "#version 130";
|
||||
#endif
|
||||
|
||||
static bool isInitialized = false;
|
||||
if (!isInitialized) {
|
||||
// Initialize OpenGL loader
|
||||
|
||||
@@ -14,6 +14,7 @@ struct SDL_Window;
|
||||
typedef void * SDL_GLContext;
|
||||
typedef union SDL_Event SDL_Event;
|
||||
|
||||
IMGUI_API bool ImGui_PreInit();
|
||||
IMGUI_API ImGuiContext* ImGui_Init(SDL_Window* window, SDL_GLContext gl_context);
|
||||
|
||||
void IMGUI_API ImGui_Shutdown();
|
||||
|
||||
Reference in New Issue
Block a user