X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fflexui%2Ffui_gfx_gl.pas;h=e543fc0e7023a9700a08ddf705f83f439aa8958c;hb=3b7ef59c450d979b7011cdeaadd6d8e59c34f197;hp=e29d9c1cd78e9d8d53e99e6656624c6c60500bef;hpb=3ac8e856ce4d7955fa9c12fe5a2d6500fd68f4fb;p=d2df-sdl.git diff --git a/src/flexui/fui_gfx_gl.pas b/src/flexui/fui_gfx_gl.pas index e29d9c1..e543fc0 100644 --- a/src/flexui/fui_gfx_gl.pas +++ b/src/flexui/fui_gfx_gl.pas @@ -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();