1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-27 11:57:40 +00:00

shaderside projection for DIM==3

This commit is contained in:
?
2019-02-22 21:01:01 +01:00
committed by Zeno Rogue
parent 56d628d4d8
commit 0ea37718f0
4 changed files with 27 additions and 9 deletions

View File

@@ -490,11 +490,15 @@ vector<glvertex> line_vertices;
#endif
void glapplymatrix(const transmatrix& V) {
#if DIM == 3
glhr::set_modelview(glhr::id);
#else
GLfloat mat[16];
int id = 0;
if(DIM == 3) {
for(int y=0; y<4; y++) {
for(int x=0; x<4; x++) mat[id++] = V[x][y];
}
glhr::set_modelview(glhr::as_glmatrix(mat));
return;
}
for(int y=0; y<3; y++) {
for(int x=0; x<3; x++) mat[id++] = V[x][y];
@@ -512,7 +516,6 @@ void glapplymatrix(const transmatrix& V) {
conformal::apply_orientation(mat[a*4], mat[a*4+1]);
glhr::set_modelview(glhr::as_glmatrix(mat));
#endif
}
void dqi_poly::gldraw() {