summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8eceec6)
raw | patch | inline | side by side (parent: 8eceec6)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Tue, 14 Feb 2023 12:03:37 +0000 (15:03 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 9 Jun 2023 09:13:03 +0000 (12:13 +0300) |
src/nogl/noGLES1.inc | patch | blob | history |
diff --git a/src/nogl/noGLES1.inc b/src/nogl/noGLES1.inc
index 6bc0acb937a361685297bca2597817b86851d243..15765bf36253d22e81842b4e8c830ca7beb34049 100644 (file)
--- a/src/nogl/noGLES1.inc
+++ b/src/nogl/noGLES1.inc
es_glFinish: procedure; cdecl;
es_glMultMatrixf: procedure (m: PGLfloat); cdecl;
- //es_glOrthof: procedure (left, right, bottom, top, near, far: GLfloat); cdecl;
+ es_glOrthof: procedure (left, right, bottom, top, near, far: GLfloat); cdecl;
es_glLoadIdentity: procedure; cdecl;
es_glMatrixMode: procedure (mode: GLenum); cdecl;
es_glLoadMatrixf: procedure (m: PGLfloat); cdecl;
procedure glOrtho (left, right, bottom, top, near, far: GLdouble);
var m: array [0..15] of GLfloat;
begin
- {es_glOrthof(left, right, bottom, top, near, far);}
- m[0] := 2 / (right - left);
- m[1] := 0;
- m[2] := 0;
- m[3] := 0;
- m[4] := 0;
- m[5] := 2 / (top - bottom);
- m[6] := 0;
- m[7] := 0;
- m[8] := 0;
- m[9] := 0;
- m[10] := -2 / (far - near);
- m[11] := 0;
- m[12] := -((right + left) / (right - left));
- m[13] := -((top + bottom) / (top - bottom));
- m[14] := -((far + near) / (far - near));
- m[15] := 1;
- es_glMultMatrixf(@m[0]);
+ if assigned(es_glOrthof) then
+ begin
+ es_glOrthof(left, right, bottom, top, near, far);
+ end
+ else
+ begin
+ m[0] := 2 / (right - left);
+ m[1] := 0;
+ m[2] := 0;
+ m[3] := 0;
+ m[4] := 0;
+ m[5] := 2 / (top - bottom);
+ m[6] := 0;
+ m[7] := 0;
+ m[8] := 0;
+ m[9] := 0;
+ m[10] := -2 / (far - near);
+ m[11] := 0;
+ m[12] := -((right + left) / (right - left));
+ m[13] := -((top + bottom) / (top - bottom));
+ m[14] := -((far + near) / (far - near));
+ m[15] := 1;
+ es_glMultMatrixf(@m[0]);
+ end;
end;
procedure glLoadIdentity;
es_glFinish := SDL_GL_GetProcAddress('glFinish');
es_glMultMatrixf := SDL_GL_GetProcAddress('glMultMatrixf');
- //es_glOrthof := SDL_GL_GetProcAddress('glOrthof');
+ es_glOrthof := SDL_GL_GetProcAddress('glOrthof');
es_glLoadIdentity := SDL_GL_GetProcAddress('glLoadIdentity');
es_glMatrixMode := SDL_GL_GetProcAddress('glMatrixMode');
es_glLoadMatrixf := SDL_GL_GetProcAddress('glLoadMatrixf');
es_glFinish := nil;
es_glMultMatrixf := nil;
- //es_glOrthof := nil;
+ es_glOrthof := nil;
es_glLoadIdentity := nil;
es_glMatrixMode := nil;
es_glLoadMatrixf := nil;