mirror of https://github.com/bjornbytes/lovr.git
rm skybox args;
They used to always be necessary, now they are almost never necessary.
This commit is contained in:
parent
e3e930d6cc
commit
2fb393306c
|
@ -914,11 +914,7 @@ static int l_lovrGraphicsSphere(lua_State* L) {
|
|||
|
||||
static int l_lovrGraphicsSkybox(lua_State* L) {
|
||||
Texture* texture = luax_checktype(L, 1, Texture);
|
||||
float angle = luax_optfloat(L, 2, 0.f);
|
||||
float ax = luax_optfloat(L, 3, 0.f);
|
||||
float ay = luax_optfloat(L, 4, 1.f);
|
||||
float az = luax_optfloat(L, 5, 0.f);
|
||||
lovrGraphicsSkybox(texture, angle, ax, ay, az);
|
||||
lovrGraphicsSkybox(texture);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1145,16 +1145,13 @@ void lovrGraphicsSphere(Material* material, mat4 transform, int segments) {
|
|||
}
|
||||
}
|
||||
|
||||
void lovrGraphicsSkybox(Texture* texture, float angle, float ax, float ay, float az) {
|
||||
void lovrGraphicsSkybox(Texture* texture) {
|
||||
TextureType type = lovrTextureGetType(texture);
|
||||
lovrAssert(type == TEXTURE_CUBE || type == TEXTURE_2D, "Only 2D and cube textures can be used as skyboxes");
|
||||
|
||||
Pipeline pipeline = state.pipeline;
|
||||
pipeline.winding = WINDING_COUNTERCLOCKWISE;
|
||||
|
||||
float transform[16] = MAT4_IDENTITY;
|
||||
mat4_rotate(transform, angle, ax, ay, az);
|
||||
|
||||
float* vertices = NULL;
|
||||
|
||||
lovrGraphicsBatch(&(BatchRequest) {
|
||||
|
@ -1162,7 +1159,6 @@ void lovrGraphicsSkybox(Texture* texture, float angle, float ax, float ay, float
|
|||
.topology = DRAW_TRIANGLE_STRIP,
|
||||
.shader = type == TEXTURE_CUBE ? SHADER_CUBE : SHADER_PANO,
|
||||
.pipeline = &pipeline,
|
||||
.transform = transform,
|
||||
.diffuseTexture = type == TEXTURE_2D ? texture : NULL,
|
||||
.environmentMap = type == TEXTURE_CUBE ? texture : NULL,
|
||||
.vertexCount = 4,
|
||||
|
|
|
@ -167,7 +167,7 @@ void lovrGraphicsArc(DrawStyle style, ArcMode mode, struct Material* material, m
|
|||
void lovrGraphicsCircle(DrawStyle style, struct Material* material, mat4 transform, int segments);
|
||||
void lovrGraphicsCylinder(struct Material* material, mat4 transform, float r1, float r2, bool capped, int segments);
|
||||
void lovrGraphicsSphere(struct Material* material, mat4 transform, int segments);
|
||||
void lovrGraphicsSkybox(struct Texture* texture, float angle, float ax, float ay, float az);
|
||||
void lovrGraphicsSkybox(struct Texture* texture);
|
||||
void lovrGraphicsPrint(const char* str, size_t length, mat4 transform, float wrap, HorizontalAlign halign, VerticalAlign valign);
|
||||
void lovrGraphicsFill(struct Texture* texture, float u, float v, float w, float h);
|
||||
void lovrGraphicsDrawMesh(struct Mesh* mesh, mat4 transform, uint32_t instances, float* pose);
|
||||
|
|
Loading…
Reference in New Issue