From: fgsfds Date: Wed, 26 Feb 2020 16:02:37 +0000 (+0300) Subject: add glGetError to nogl X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=e6a3d6009b888d4d31b9efba92ec67ee41e90be0;p=d2df-sdl.git add glGetError to nogl --- diff --git a/src/nogl/noGL.pas b/src/nogl/noGL.pas index 68c74ad..243d7c9 100644 --- a/src/nogl/noGL.pas +++ b/src/nogl/noGL.pas @@ -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); diff --git a/src/nogl/noGLES1.inc b/src/nogl/noGLES1.inc index 9aa8783..05cce69 100644 --- a/src/nogl/noGLES1.inc +++ b/src/nogl/noGLES1.inc @@ -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'); diff --git a/src/nogl/noGLSTUB.inc b/src/nogl/noGLSTUB.inc index e0150b6..5fa0e47 100644 --- a/src/nogl/noGLSTUB.inc +++ b/src/nogl/noGLSTUB.inc @@ -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;