mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-29 08:54:34 +00:00
Emscripten expects GLES2 (WebGL 1).
This commit is contained in:
parent
1d482a417d
commit
863b36d04b
@ -1,6 +1,10 @@
|
||||
#include "imgui/imgui_impl_glfw.h"
|
||||
#include "imgui/imgui_impl_opengl3.h"
|
||||
#include "imgui/imgui_impl_opengl3_loader.h"
|
||||
#ifdef __EMSCRIPTEN__
|
||||
# include <GLES2/gl2.h>
|
||||
#else
|
||||
# include "imgui/imgui_impl_opengl3_loader.h"
|
||||
#endif
|
||||
|
||||
#include <chrono>
|
||||
#include <GLFW/glfw3.h>
|
||||
@ -80,7 +84,11 @@ Backend::Backend( const char* title, std::function<void()> redraw, RunQueue* mai
|
||||
glfwSetWindowRefreshCallback( s_window, []( GLFWwindow* ) { s_redraw(); } );
|
||||
|
||||
ImGui_ImplGlfw_InitForOpenGL( s_window, true );
|
||||
#ifdef __EMSCRIPTEN__
|
||||
ImGui_ImplOpenGL3_Init( "#version 100" );
|
||||
#else
|
||||
ImGui_ImplOpenGL3_Init( "#version 150" );
|
||||
#endif
|
||||
|
||||
s_redraw = redraw;
|
||||
s_mainThreadTasks = mainThreadTasks;
|
||||
|
@ -1,6 +1,10 @@
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "../profiler/src/imgui/imgui_impl_opengl3_loader.h"
|
||||
#ifdef __EMSCRIPTEN__
|
||||
# include <GLES2/gl2.h>
|
||||
#else
|
||||
# include "../profiler/src/imgui/imgui_impl_opengl3_loader.h"
|
||||
#endif
|
||||
#include "TracyTexture.hpp"
|
||||
|
||||
#ifndef COMPRESSED_RGB_S3TC_DXT1_EXT
|
||||
|
Loading…
Reference in New Issue
Block a user