[client] egl: rework egl to accomodate post-processing filtering

This commit is contained in:
Geoffrey McRae
2021-08-09 14:08:10 +10:00
parent 30ad28ffd1
commit 86d6b67337
21 changed files with 793 additions and 183 deletions

View File

@@ -93,7 +93,7 @@ void egl_modelFree(EGL_Model ** model)
*model = NULL;
}
void egl_modelSetDefault(EGL_Model * model)
void egl_modelSetDefault(EGL_Model * model, bool flipped)
{
static const GLfloat square[] =
{
@@ -103,7 +103,15 @@ void egl_modelSetDefault(EGL_Model * model)
1.0f, 1.0f, 0.0f
};
static const GLfloat uvs[] =
static const GLfloat uvsNormal[] =
{
0.0f, 0.0f,
1.0f, 0.0f,
0.0f, 1.0f,
1.0f, 1.0f
};
static const GLfloat uvsFlipped[] =
{
0.0f, 1.0f,
1.0f, 1.0f,
@@ -111,7 +119,7 @@ void egl_modelSetDefault(EGL_Model * model)
1.0f, 0.0f
};
egl_modelAddVerts(model, square, uvs, 4);
egl_modelAddVerts(model, square, flipped ? uvsFlipped : uvsNormal, 4);
}
void egl_modelAddVerts(EGL_Model * model, const GLfloat * verticies, const GLfloat * uvs, const size_t count)