File gambas2-fix-deprecated-gluOrtho2D.patch of Package gambas2

diff -Naru gambas2-2.24.0_orig/gb.opengl/src/GLUcoordTransf.c gambas2-2.24.0/gb.opengl/src/GLUcoordTransf.c
--- gambas2-2.24.0_orig/gb.opengl/src/GLUcoordTransf.c	2012-04-09 03:34:42.000000000 +0900
+++ gambas2-2.24.0/gb.opengl/src/GLUcoordTransf.c	2025-12-03 16:10:23.711939656 +0900
@@ -40,7 +40,9 @@
 
 BEGIN_METHOD(GLUORTHO2D, GB_FLOAT left; GB_FLOAT right; GB_FLOAT bottom; GB_FLOAT top)
 
-	gluOrtho2D(VARG(left),VARG(right),VARG(bottom),VARG(top));
+        // gluOrtho2D was deprecated; replaced with glOrtho(L,R,B,T,-1,1)
+	// see: https://registry.khronos.org/OpenGL-Refpages/gl2.1/xhtml/gluOrtho2D.xml
+	glOrtho(VARG(left),VARG(right),VARG(bottom),VARG(top),-1.0f,1.0f);
 
 END_METHOD
 
diff -Naru gambas2-2.24.0_orig/gb.sdl/src/Cwindow.cpp gambas2-2.24.0/gb.sdl/src/Cwindow.cpp
--- gambas2-2.24.0_orig/gb.sdl/src/Cwindow.cpp	2012-04-09 03:34:41.000000000 +0900
+++ gambas2-2.24.0/gb.sdl/src/Cwindow.cpp	2025-12-03 16:10:35.039799382 +0900
@@ -360,7 +360,9 @@
 		glViewport(0, 0, this->GetWidth(), this->GetHeight());
 		glMatrixMode(GL_PROJECTION);
 		glLoadIdentity();
-		gluOrtho2D(0.0f, GLdouble(this->GetWidth()), GLdouble(this->GetHeight()), 0.0f);
+		// gluOrtho2D was deprecated; replaced with glOrtho(L,R,B,T,-1,1)
+		// see: https://registry.khronos.org/OpenGL-Refpages/gl2.1/xhtml/gluOrtho2D.xml
+		glOrtho(0.0f, GLdouble(this->GetWidth()), GLdouble(this->GetHeight()), 0.0f, -1.0f, 1.0f);
 		// enable blending, should work like 2d sdl does
 		glEnable(GL_BLEND);
 		glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
openSUSE Build Service is sponsored by