implementation
uses
- {$IFDEF USE_GLES1}
- GLES11,
- {$ELSE}
- GL, GLEXT,
- {$ENDIF}
+ {$I ../../../nogl/noGLuses.inc}
SysUtils, Classes, Math,
e_log, utils
;
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
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,
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;
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
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);
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;
begin
end;
+ procedure glOrtho (left, right, bottom, top, near, far: GLfloat);
+ begin
+ end;
+
procedure glLoadIdentity;
begin
end;