add get error function
This commit is contained in:
parent
f902cc3f29
commit
f3de37eff3
9
src/external/rlsw.h
vendored
9
src/external/rlsw.h
vendored
|
|
@ -252,6 +252,7 @@ typedef double GLclampd;
|
||||||
#define glDisable(state) swDisable(state)
|
#define glDisable(state) swDisable(state)
|
||||||
#define glGetFloatv(pname, params) swGetFloatv(pname, params)
|
#define glGetFloatv(pname, params) swGetFloatv(pname, params)
|
||||||
#define glGetString(pname) swGetString(pname)
|
#define glGetString(pname) swGetString(pname)
|
||||||
|
#define glGetError() swGetError()
|
||||||
#define glViewport(x, y, w, h) swViewport(x, y, w, h)
|
#define glViewport(x, y, w, h) swViewport(x, y, w, h)
|
||||||
#define glScissor(x, y, w, h) swScissor(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)
|
#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);
|
void swGetFloatv(SWget name, float* v);
|
||||||
const char* swGetString(SWget name);
|
const char* swGetString(SWget name);
|
||||||
|
SWerrcode swGetError(void);
|
||||||
|
|
||||||
void swViewport(int x, int y, int width, int height);
|
void swViewport(int x, int y, int width, int height);
|
||||||
void swScissor(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;
|
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)
|
void swViewport(int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
if (x <= -width || y <= -height) {
|
if (x <= -width || y <= -height) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user