mirror of https://github.com/bjornbytes/lovr.git
Pipeline -> 4 bytes; lineWidth -> uint8_t;
This commit is contained in:
parent
561805450d
commit
62645cde28
|
@ -526,7 +526,7 @@ static int l_lovrGraphicsGetLineWidth(lua_State* L) {
|
|||
}
|
||||
|
||||
static int l_lovrGraphicsSetLineWidth(lua_State* L) {
|
||||
float width = luaL_optnumber(L, 1, 1.f);
|
||||
uint8_t width = (uint8_t) luaL_optinteger(L, 1, 1);
|
||||
lovrGraphicsSetLineWidth(width);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -297,7 +297,8 @@ float lovrGraphicsGetLineWidth() {
|
|||
return state.pipeline->lineWidth;
|
||||
}
|
||||
|
||||
void lovrGraphicsSetLineWidth(float width) {
|
||||
void lovrGraphicsSetLineWidth(uint8_t width) {
|
||||
lovrAssert(width > 0 && width <= 255, "Line width must be between 0 and 255");
|
||||
state.pipeline->lineWidth = width;
|
||||
}
|
||||
|
||||
|
|
|
@ -100,17 +100,17 @@ typedef struct {
|
|||
} Camera;
|
||||
|
||||
typedef struct {
|
||||
bool alphaSampling;
|
||||
BlendMode blendMode;
|
||||
BlendAlphaMode blendAlphaMode;
|
||||
bool culling;
|
||||
CompareMode depthTest;
|
||||
bool depthWrite;
|
||||
float lineWidth;
|
||||
CompareMode stencilMode;
|
||||
int stencilValue;
|
||||
Winding winding;
|
||||
bool wireframe;
|
||||
BlendMode blendMode : 3;
|
||||
BlendAlphaMode blendAlphaMode : 1;
|
||||
CompareMode depthTest : 3;
|
||||
bool depthWrite : 1;
|
||||
uint8_t lineWidth : 8;
|
||||
uint8_t stencilValue: 8;
|
||||
CompareMode stencilMode : 3;
|
||||
bool alphaSampling : 1;
|
||||
bool culling : 1;
|
||||
Winding winding : 1;
|
||||
bool wireframe : 1;
|
||||
} Pipeline;
|
||||
|
||||
typedef struct {
|
||||
|
@ -198,7 +198,7 @@ Font* lovrGraphicsGetFont();
|
|||
void lovrGraphicsSetFont(Font* font);
|
||||
bool lovrGraphicsIsGammaCorrect();
|
||||
float lovrGraphicsGetLineWidth();
|
||||
void lovrGraphicsSetLineWidth(float width);
|
||||
void lovrGraphicsSetLineWidth(uint8_t width);
|
||||
float lovrGraphicsGetPointSize();
|
||||
void lovrGraphicsSetPointSize(float size);
|
||||
Shader* lovrGraphicsGetShader();
|
||||
|
|
|
@ -47,7 +47,7 @@ static struct {
|
|||
bool depthEnabled;
|
||||
CompareMode depthTest;
|
||||
bool depthWrite;
|
||||
float lineWidth;
|
||||
uint8_t lineWidth;
|
||||
bool stencilEnabled;
|
||||
CompareMode stencilMode;
|
||||
int stencilValue;
|
||||
|
|
Loading…
Reference in New Issue