File tree Expand file tree Collapse file tree
src/engine_lib/src/render Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828#include <window.h>
2929#include <world.h>
3030#include <glad/glad.h>
31+ #include <SDL3/SDL_messagebox.h>
3132
3233// Stuff needed to calculate FPS and keep frame limit.
3334typedef struct te_renderer_frame_stats {
@@ -120,12 +121,19 @@ renderer_create(struct te_window* window) {
120121 // Create GL context.
121122 renderer -> gl_context = SDL_GL_CreateContext (prv_window_get_sdl_window (window ));
122123 if (renderer -> gl_context == NULL ) {
124+ #if defined(WIN32 )
125+ SDL_ShowSimpleMessageBox (SDL_MESSAGEBOX_ERROR , "Error" , SDL_GetError (), NULL );
126+ #endif
123127 log_error (SDL_GetError ());
124128 abort ();
125129 }
126130
127131 // Initialize GLAD.
128132 if (gladLoadGLES2Loader ((GLADloadproc )SDL_GL_GetProcAddress ) == 0 ) {
133+ #if defined(WIN32 )
134+ SDL_ShowSimpleMessageBox (
135+ SDL_MESSAGEBOX_ERROR , "Error" , "failed to load OpenGL ES" , NULL );
136+ #endif
129137 log_error ("failed to load OpenGL ES" );
130138 abort ();
131139 }
You can’t perform that action at this time.
0 commit comments