In a code such as this:
glNewList(di, GL_COMPILE);glColor3f(r1, g1, b1);glBegin(GL_QUADS);glVertex3f(1, 1, 0);glVertex3f(-1, 1, 0);glVertex3f(-1, -1, 0);glVertex3f(1, -1, 0);glColor3f(r2, g2, b2);glVertex3f(...
The first 4 vertices should have color r1,g1,b1 and the rest should have color r2,g2,b2.
But the 4th vertex has a wrong color (when drawing the display list).
I think the fix is to change these lines in function bl_draw in file src/gl/block.c:
if ((pos = block->incomplete.color) >= 0) {for (int i = 0; i < pos; i++) {
to:
if ((pos = block->incomplete.color) >= 0) {for (int i = 0; i <= pos; i++) {
In a code such as this:
glNewList(di, GL_COMPILE);
glColor3f(r1, g1, b1);
glBegin(GL_QUADS);
glVertex3f(1, 1, 0);
glVertex3f(-1, 1, 0);
glVertex3f(-1, -1, 0);
glVertex3f(1, -1, 0);
glColor3f(r2, g2, b2);
glVertex3f(...
The first 4 vertices should have color r1,g1,b1 and the rest should have color r2,g2,b2. But the 4th vertex has a wrong color (when drawing the display list).I think the fix is to change these lines in function bl_draw in file src/gl/block.c:
if ((pos = block->incomplete.color) >= 0) {
for (int i = 0; i < pos; i++) {
to:if ((pos = block->incomplete.color) >= 0) {
for (int i = 0; i <= pos; i++) {
The normals probably have the same problem.