Browse Source

add get error function

pull/4832/head
Bigfoot71 1 week ago
parent
commit
f3de37eff3
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      src/external/rlsw.h

+ 9
- 0
src/external/rlsw.h View File

@ -252,6 +252,7 @@ typedef double GLclampd;
#define glDisable(state) swDisable(state)
#define glGetFloatv(pname, params) swGetFloatv(pname, params)
#define glGetString(pname) swGetString(pname)
#define glGetError() swGetError()
#define glViewport(x, y, w, h) swViewport(x, y, w, h)
#define glScissor(x, y, w, h) swScissor(x, y, w, h)
#define glClearColor(r, g, b, a) swClearColor(r, g, b, a)
@ -459,6 +460,7 @@ void swDisable(SWstate state);
void swGetFloatv(SWget name, float* v);
const char* swGetString(SWget name);
SWerrcode swGetError(void);
void swViewport(int x, int y, int width, int height);
void swScissor(int x, int y, int width, int height);
@ -3345,6 +3347,13 @@ const char* swGetString(SWget name)
return result;
}
SWerrcode swGetError(void)
{
SWerrcode ret = RLSW.errCode;
RLSW.errCode = SW_NO_ERROR;
return ret;
}
void swViewport(int x, int y, int width, int height)
{
if (x <= -width || y <= -height) {

Loading…
Cancel
Save