From e445a2635a76328d054f21ad5ebf52c6fad1c6a2 Mon Sep 17 00:00:00 2001 From: Garux Date: Fri, 28 Oct 2022 09:50:44 +0300 Subject: [PATCH] fix crash with 'load shaders at startup' (was occuring before ogl init) --- radiant/main.cpp | 4 ---- radiant/texwindow.cpp | 2 ++ radiant/texwindow.h | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/radiant/main.cpp b/radiant/main.cpp index d8b06f5a..894f9ed4 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -521,10 +521,6 @@ int main( int argc, char* argv[] ){ { Map_New(); } - // load up shaders now that we have the map loaded - // eviltypeguy - TextureBrowser_ShowStartupShaders(); - remove_local_pid(); diff --git a/radiant/texwindow.cpp b/radiant/texwindow.cpp index 0e89f03f..209095f0 100644 --- a/radiant/texwindow.cpp +++ b/radiant/texwindow.cpp @@ -1633,6 +1633,8 @@ protected: void initializeGL() override { glwidget_context_created( *this ); + // show definitely after gl init, otherwise crash + TextureBrowser_ShowStartupShaders(); } void resizeGL( int w, int h ) override { diff --git a/radiant/texwindow.h b/radiant/texwindow.h index 7e8509ce..f02aea71 100644 --- a/radiant/texwindow.h +++ b/radiant/texwindow.h @@ -29,7 +29,6 @@ QWidget* TextureBrowser_constructWindow( QWidget* toplevel ); void TextureBrowser_destroyWindow(); -void TextureBrowser_ShowStartupShaders(); const char* TextureBrowser_GetSelectedShader(); void TextureBrowser_Construct();