mirror of https://github.com/bjornbytes/lovr.git
Simplify CompareMode handling;
This commit is contained in:
parent
85ab7c7c6e
commit
8e942561f1
|
@ -63,7 +63,6 @@ const char* BufferUsages[] = {
|
|||
};
|
||||
|
||||
const char* CompareModes[] = {
|
||||
[COMPARE_NONE] = "always",
|
||||
[COMPARE_EQUAL] = "equal",
|
||||
[COMPARE_NEQUAL] = "notequal",
|
||||
[COMPARE_LESS] = "less",
|
||||
|
@ -561,12 +560,6 @@ static int l_lovrGraphicsGetStencilTest(lua_State* L) {
|
|||
CompareMode mode;
|
||||
int value;
|
||||
lovrGraphicsGetStencilTest(&mode, &value);
|
||||
|
||||
if (mode == COMPARE_NONE) {
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
lua_pushstring(L, CompareModes[mode]);
|
||||
lua_pushinteger(L, value);
|
||||
return 2;
|
||||
|
|
|
@ -41,13 +41,13 @@ typedef enum {
|
|||
} BlendAlphaMode;
|
||||
|
||||
typedef enum {
|
||||
COMPARE_NONE,
|
||||
COMPARE_EQUAL,
|
||||
COMPARE_NEQUAL,
|
||||
COMPARE_LESS,
|
||||
COMPARE_LEQUAL,
|
||||
COMPARE_GREATER,
|
||||
COMPARE_GEQUAL
|
||||
COMPARE_GEQUAL,
|
||||
COMPARE_NONE
|
||||
} CompareMode;
|
||||
|
||||
typedef enum {
|
||||
|
|
Loading…
Reference in New Issue