[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] gtk3: Add error message when shader can't be loaded
From: |
Nikolas Nyby |
Subject: |
[PATCH] gtk3: Add error message when shader can't be loaded |
Date: |
Wed, 15 May 2024 00:09:54 -0400 |
---
board3d/GLwidget.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/board3d/GLwidget.c b/board3d/GLwidget.c
index 95ad2650..0a57da02 100644
--- a/board3d/GLwidget.c
+++ b/board3d/GLwidget.c
@@ -170,6 +170,11 @@ void GLWidgetMakeCurrent(GtkWidget* widget)
static void SelectProgram(ShaderDetails* pShader)
{
+ if (glIsProgram(pShader->shader) != GL_TRUE) {
+ fprintf(stderr, _("Can't load shader program\n"));
+ return;
+ }
+
currentShader = pShader;
glUseProgram(currentShader->shader);
}
--
2.34.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] gtk3: Add error message when shader can't be loaded,
Nikolas Nyby <=