DEADSOFTWARE

add glGetError to nogl
authorfgsfds <pvt.fgsfds@gmail.com>
Wed, 26 Feb 2020 16:02:37 +0000 (19:02 +0300)
committerfgsfds <pvt.fgsfds@gmail.com>
Wed, 26 Feb 2020 16:02:37 +0000 (19:02 +0300)
src/nogl/noGL.pas
src/nogl/noGLES1.inc
src/nogl/noGLSTUB.inc

index 68c74ad874f0c9c1085a894ff6f39827b4918390..243d7c9c496d5c104ec7d10015b2774c7e683647 100644 (file)
@@ -42,6 +42,7 @@ interface
     TGLclampx   = GLclampx;
 
   const
+    GL_NO_ERROR = 0;
     GL_NEAREST = $2600;
     GL_DEPTH_TEST = $0B71;
     GL_SCISSOR_TEST = $0C11;
@@ -148,6 +149,7 @@ interface
   procedure glDisable(cap: GLenum);
   function  glIsEnabled(cap: GLenum): GLboolean;
   function  glGetString(name: GLenum): PChar;
+  function  glGetError: GLenum;
   procedure glClearColor(red, green, blue, alpha: GLclampf);
   procedure glClear(mask: GLbitfield);
   procedure glAlphaFunc(func: GLenum; ref: GLclampf);
index 9aa878324dc0159081663f9e56c145e962fdb628..05cce69c940cda006edc5d20ba844968845f2d53 100644 (file)
@@ -46,6 +46,7 @@ implementation
     es_glDisable: procedure (cap: GLenum); cdecl;
     es_glIsEnabled: function (cap: GLenum): GLBoolean; cdecl;
     es_glGetString: function (name: GLenum): PChar; cdecl;
+    es_glGetError: function (): GLenum; cdecl;
     es_glClearColor: procedure (red, green, blue, alpha: GLclampf); cdecl;
     es_glClear: procedure (mask: GLbitfield); cdecl;
     es_glAlphaFunc: procedure (func: GLenum; ref: GLclampf); cdecl;
@@ -115,6 +116,11 @@ implementation
     result := es_glGetString(name);
   end;
 
+  function glGetError: GLenum;
+  begin
+    result := es_glGetError
+  end;
+
   procedure glClearColor(red, green, blue, alpha: GLclampf);
   begin
     es_glClearColor(red, green, blue, alpha);
@@ -492,6 +498,7 @@ implementation
     es_glDisable := SDL_GL_GetProcAddress('glDisable');
     es_glIsEnabled := SDL_GL_GetProcAddress('glIsEnabled');
     es_glGetString := SDL_GL_GetProcAddress('glGetString');
+    es_glGetError := SDL_GL_GetProcAddress('glGetError');
     es_glClearColor := SDL_GL_GetProcAddress('glClearColor');
     es_glClear := SDL_GL_GetProcAddress('glClear');
     es_glAlphaFunc := SDL_GL_GetProcAddress('glAlphaFunc');
index e0150b64724d2b7bec47997c677d4b1db1ff98b0..5fa0e47d7539c8245c4135873f315cc691cd41b6 100644 (file)
@@ -18,6 +18,11 @@ implementation
     result := ''
   end;
 
+  function glGetError: GLenum;
+  begin
+    result := GL_NO_ERROR
+  end;
+
   procedure glClearColor(red, green, blue, alpha: GLclampf);
   begin
   end;