This commit is contained in:
Nishi 2026-01-27 22:35:38 +09:00
commit b671f32807
Signed by: nishi
GPG key ID: 27EF69B208EB9343
3 changed files with 4 additions and 15 deletions

View file

@ -98,17 +98,6 @@ void GSClientDestroy(GSClient client) {
static void scene(GSClient client) {
if(client->engine->param->render != NULL) client->engine->param->render(client->engine);
GSVector3 n = {0, 1, 0};
GSVector3 q[] = {
{-3, -1, 3},
{-3, -1, -3},
{3, -1, -3},
{3, -1, 3}};
GSGLTextureSet(client->gl, 2);
GSGLPolygon(client->gl, 4, q, NULL, n);
GSGLTextureSet(client->gl, 0);
}
void GSClientStep(GSClient client) {

View file

@ -54,8 +54,8 @@ void GSMathAdd3(GSVector3 r, GSVector3 v0, GSVector3 v1) {
void GSMathNormal3x3(GSVector3 r, GSVector3 v0, GSVector3 v1, GSVector3 v2) {
GSVector3 t0, t1;
GSMathSubtract3(t0, v1, v0);
GSMathSubtract3(t1, v2, v0);
GSMathSubtract3(t0, v1, v2);
GSMathSubtract3(t1, v0, v2);
GSMathCross3(r, t0, t1);

View file

@ -147,8 +147,8 @@ static void parse_obj(GSModel model, char* txt) {
}
}
if(c == 3) GSMathNormal3x3(face.normal, face.vertex[2], face.vertex[1], face.vertex[0]);
if(c == 4) GSMathNormal3x4(face.normal, face.vertex[3], face.vertex[2], face.vertex[1], face.vertex[0]);
if(c == 3) GSMathNormal3x3(face.normal, face.vertex[0], face.vertex[1], face.vertex[2]);
if(c == 4) GSMathNormal3x4(face.normal, face.vertex[0], face.vertex[1], face.vertex[2], face.vertex[3]);
arrput(model->face, face);
}