summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b790627)
raw | patch | inline | side by side (parent: b790627)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 13 Feb 2023 16:56:20 +0000 (19:56 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 9 Jun 2023 09:12:42 +0000 (12:12 +0300) |
index 8442a2a4dbaa99ff01842c3ca08ceea4fe8e832e..fdb7c09ec1da8e08f639e21a26f4c26878473c89 100644 (file)
implementation
uses
- {$IFDEF USE_GLES1}
- GLES11,
- {$ELSE}
- GL, GLEXT,
- {$ENDIF}
+ {$I ../../../nogl/noGLuses.inc}
SysUtils, Classes, Math,
e_log, utils
;
index 2786eb3318a01ce8c807dd34e4e074925c927c92..d95d3a475ff26184f36d504676683503269f8157 100644 (file)
implementation
uses
- {$IFDEF USE_GLES1}
- GLES11,
- {$ELSE}
- GL, GLEXT,
- {$ENDIF}
+ {$I ../../../nogl/noGLuses.inc}
{$IFDEF ENABLE_SYSTEM}
g_system,
{$ENDIF}
hh := gScreenHeight - yy - 96;
r_Draw_Setup(gWinSizeX, gWinSizeY, gScreenWidth, gScreenHeight);
glClearColor(0.0, 0.0, 0.0, 0.0);
- glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
+ glClear(GL_COLOR_BUFFER_BIT);
r_Common_DrawBackground(GameWad + ':TEXTURES/INTER');
r_Draw_FillRect(0, 0, gScreenWidth - 1, gScreenHeight - 1, 0, 0, 0, 105);
if menufont <> nil then
index d2fa1f3d229988bf185f100a89288ba00ce21e17..49ea34c0d53bf4cf2abe1ab84727745ee3288c82 100644 (file)
implementation
uses
+ {$I ../../../nogl/noGLuses.inc}
Math, SysUtils,
- {$IFDEF USE_GLES1}
- GLES11,
- {$ELSE}
- GL, GLEXT,
- {$ENDIF}
e_log,
binheap, MAPDEF, utils,
g_options, g_animations, g_basic, g_phys,
index e6aa258de895144c6148f43f61a4c59c3b44e06a..b896b06cc189757131193261a53e450a576b8bdb 100644 (file)
implementation
uses
- {$IFDEF USE_GLES1}
- GLES11,
- {$ELSE}
- GL, GLEXT,
- {$ENDIF}
+ {$I ../../../nogl/noGLuses.inc}
{$IFDEF ENABLE_MENU}
r_gui,
{$ENDIF}
info.maximized := gRC_Maximized;
info.major := 1;
info.minor := 1;
- info.profile := TGLProfile.Compat;
+ {$IFDEF USE_GLES1}
+ info.profile := TGLProfile.Common;
+ {$ELSE}
+ info.profile := TGLProfile.Compat;
+ {$ENDIF}
result := info;
end;
{$ENDIF}
raise Exception.Create('Failed to set videomode on startup.');
sys_EnableVSync(gVSync);
{$ENDIF}
+ {$IFDEF NOGL_INIT}
+ nogl_Init;
+ {$ENDIF}
r_LoadScreen_Initialize;
r_Textures_Initialize;
r_Console_Initialize;
r_Console_Finalize;
r_Textures_Finalize;
r_LoadScreen_Finalize;
+ {$IFDEF NOGL_INIT}
+ nogl_Quit;
+ {$ENDIF}
end;
procedure r_Render_Update;
r_Draw_Setup(gWinSizeX, gWinSizeY, gScreenWidth, gScreenHeight);
glClearColor(0.0, 0.0, 0.0, 0.0);
- glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
+ glClear(GL_COLOR_BUFFER_BIT);
p1 := nil;
p2 := nil;
e_LogWriteln('resolution changed')
else
e_LogWriteln('resolution not changed');
- sys_EnableVSync(gVSync)
+ sys_EnableVSync(gVSync);
+ {$ENDIF}
+ {$IFDEF NOGL_INIT}
+ nogl_Init;
{$ENDIF}
end;
index 1025abad5f29d73540ecd541e33b28903fe52efe..b98c0d3507d98576d6ecafa23291bfd895280ce9 100644 (file)
interface
uses
- {$IFDEF USE_GLES1}
- GLES11,
- {$ELSE}
- GL, GLEXT,
- {$ENDIF}
+ {$I ../../../nogl/noGLuses.inc}
g_base, g_animations, // TRectHW, TAnimInfo
utils,
r_atlas, r_fonts
diff --git a/src/nogl/noGL.pas b/src/nogl/noGL.pas
index 243d7c9c496d5c104ec7d10015b2774c7e683647..90735c340c1af3096ac4b542ef852320b8d434af 100644 (file)
--- a/src/nogl/noGL.pas
+++ b/src/nogl/noGL.pas
GL_ZERO = $0;
GL_POINTS = $0000;
GL_LINES = $0001;
+ GL_LINE_LOOP = $0002;
GL_DST_COLOR = $0306;
GL_SRC_COLOR = $0300;
GL_ONE_MINUS_DST_COLOR = $0307;
GL_VERSION = $1F02;
GL_EXTENSIONS = $1F03;
GL_SHADING_LANGUAGE_VERSION = $8B8C;
+ GL_MAX_TEXTURE_SIZE = $0D33;
// const
// GL_CULL_FACE = $0B44;
procedure glReadPixels(x, y: GLint; width, height: GLsizei; format, atype: GLenum; pixels: Pointer);
+ procedure glOrtho (left, right, bottom, top, near, far: GLfloat);
procedure glLoadIdentity;
procedure glScissor(x, y: GLint; width, height: GLsizei);
procedure glViewport(x, y: GLint; width, height: GLsizei);
diff --git a/src/nogl/noGLES1.inc b/src/nogl/noGLES1.inc
index 05cce69c940cda006edc5d20ba844968845f2d53..2bfec5316ee7b0296f1c2767ea303463b98d4230 100644 (file)
--- a/src/nogl/noGLES1.inc
+++ b/src/nogl/noGLES1.inc
es_glFlush: procedure; cdecl;
es_glFinish: procedure; 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 glBegin(mode: GLenum);
begin
assert(cmds.mode = GL_INVALID_ENUM);
- assert((mode = GL_POINTS) or (mode = GL_LINES) or (mode = GL_QUADS));
+ assert((mode = GL_POINTS) or (mode = GL_LINES) or (mode = GL_QUADS) or (mode = GL_LINE_LOOP));
cmds.mode := mode;
SetLength(cmds.v, 0);
SetLength(cmds.c, 0);
+ procedure glOrtho (left, right, bottom, top, near, far: GLfloat);
+ begin
+ es_glOrthof(left, right, bottom, top, near, far);
+ end;
procedure glLoadIdentity;
begin
es_glFlush := SDL_GL_GetProcAddress('glFlush');
es_glFinish := SDL_GL_GetProcAddress('glFinish');
+ 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_glFlush := nil;
es_glFinish := nil;
+ es_glOrthof := nil;
es_glLoadIdentity := nil;
es_glMatrixMode := nil;
es_glLoadMatrixf := nil;
diff --git a/src/nogl/noGLSTUB.inc b/src/nogl/noGLSTUB.inc
index 5fa0e47d7539c8245c4135873f315cc691cd41b6..1056fa3edba9da32493342ae6ff53dd44eabe208 100644 (file)
--- a/src/nogl/noGLSTUB.inc
+++ b/src/nogl/noGLSTUB.inc
begin
end;
+ procedure glOrtho (left, right, bottom, top, near, far: GLfloat);
+ begin
+ end;
+
procedure glLoadIdentity;
begin
end;