… | |
… | |
57 | |
57 | |
58 | my $cell = $map->[$x][$y] |
58 | my $cell = $map->[$x][$y] |
59 | or next; |
59 | or next; |
60 | |
60 | |
61 | for my $num (grep $_, $cell->[0], $cell->[1], $cell->[2]) { |
61 | for my $num (grep $_, $cell->[0], $cell->[1], $cell->[2]) { |
62 | my $tex = $conn->{face}[$num]{texture} ||= do { |
62 | my $tex = $conn->{face}[$num]{texture} || 0; |
63 | $conn->send ("askface $num") unless $conn->{face}[$num]{askface}++; |
|
|
64 | |
|
|
65 | 0 |
|
|
66 | |
|
|
67 | }; |
|
|
68 | |
63 | |
69 | glBindTexture GL_TEXTURE_2D, $tex; |
64 | glBindTexture GL_TEXTURE_2D, $tex; |
70 | |
65 | |
71 | glBegin GL_QUADS; |
66 | glBegin GL_QUADS; |
72 | glTexCoord 0, 0; glVertex $x, $y; |
67 | glTexCoord 0, 0; glVertex $x, $y; |