DEADSOFTWARE

changed license to GPLv3 only; sorry, no trust to FSF anymore
[d2df-sdl.git] / src / flexui / fui_gfx_gl.pas
index e29d9c1cd78e9d8d53e99e6656624c6c60500bef..e543fc0e7023a9700a08ddf705f83f439aa8958c 100644 (file)
@@ -3,8 +3,7 @@
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation, version 3 of the License ONLY.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -21,8 +20,9 @@ unit fui_gfx_gl;
 interface
 
 uses
+  {$INCLUDE ../nogl/noGLuses.inc}
   SysUtils, Classes,
-  GL, GLExt, SDL2,
+  SDL2,
   sdlcarcass,
   fui_common, fui_events;
 
@@ -186,9 +186,9 @@ end;
 
 function isScaled (): Boolean;
 var
-  mt: packed array [0..15] of Double;
+  mt: packed array [0..15] of GLfloat;
 begin
-  glGetDoublev(GL_MODELVIEW_MATRIX, @mt[0]);
+  glGetFloatv(GL_MODELVIEW_MATRIX, @mt[0]);
   result := (mt[0] <> 1.0) or (mt[1*4+1] <> 1.0);
 end;
 
@@ -261,7 +261,7 @@ var
 // set active context; `ctx` can be `nil`
 procedure gxSetContextInternal (ctx: TGxContext; ascale: Single; domatrix: Boolean);
 var
-  mt: packed array [0..15] of Double;
+  mt: packed array [0..15] of GLfloat;
 begin
   if (savedGLState.saved) then savedGLState.restore();
 
@@ -286,7 +286,7 @@ begin
     else
     begin
       // assume uniform scale
-      glGetDoublev(GL_MODELVIEW_MATRIX, @mt[0]);
+      glGetFloatv(GL_MODELVIEW_MATRIX, @mt[0]);
       ctx.mScaled := (mt[0] <> 1.0) or (mt[1*4+1] <> 1.0);
       ctx.mScale := mt[0];
       oglSetup2DState();