diff --git a/modules/gfx/src/gl_helper.hh b/modules/gfx/src/gl_helper.hh
index 7370abbff7076573640c84411fe8c0922f2f61d9..4243d242253074b4b3ece5fcfccc8e555ab2a2da 100644
--- a/modules/gfx/src/gl_helper.hh
+++ b/modules/gfx/src/gl_helper.hh
@@ -111,6 +111,8 @@ inline void glLoadMatrix(double* arr) {
   glLoadMatrixd(arr);
 }
 
+#if OST_SHADER_SUPPORT_ENABLED
+
 inline void glLoadTransposeMatrix(float* arr) {
   glLoadTransposeMatrixf(arr);
 }
@@ -119,5 +121,6 @@ inline void glLoadTransposeMatrix(double* arr) {
   glLoadTransposeMatrixd(arr);
 }
 
+#endif
 
 #endif