void pie_RemainingPasses(void) { GL_DEBUG("Remaining passes - shadows"); // Draw shadows if (shadows) { pie_DrawShadows(); } // Draw models // TODO, sort list to reduce state changes GL_DEBUG("Remaining passes - opaque models"); for (SHAPE const &shape : shapes) { pie_SetShaderStretchDepth(shape.stretch); pie_Draw3DShape2(shape.shape, shape.frame, shape.colour, shape.teamcolour, shape.flag, shape.flag_data, shape.matrix); } // Draw translucent models last // TODO, sort list by Z order to do translucency correctly GL_DEBUG("Remaining passes - translucent models"); for (SHAPE const &shape : tshapes) { pie_SetShaderStretchDepth(shape.stretch); pie_Draw3DShape2(shape.shape, shape.frame, shape.colour, shape.teamcolour, shape.flag, shape.flag_data, shape.matrix); } pie_SetShaderStretchDepth(0); pie_DeactivateShader(); tshapes.clear(); shapes.clear(); GL_DEBUG("Remaining passes - done"); }
void pie_RemainingPasses(void) { if(shadows) { pie_DrawShadows(); } pie_DrawRemainingTransShapes(); }
void pie_RemainingPasses(void) { GL_DEBUG("Remaining passes - shadows"); glEnable(GL_LIGHT0); // Draw shadows if (shadows) { pie_DrawShadows(); } // Draw models // TODO, sort list to reduce state changes GL_DEBUG("Remaining passes - opaque models"); glPushMatrix(); glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_NORMAL_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); for (unsigned i = 0; i < shapes.size(); ++i) { pie_Draw3DShape2(shapes[i].shape, shapes[i].frame, shapes[i].colour, shapes[i].teamcolour, shapes[i].flag, shapes[i].flag_data, shapes[i].matrix); } // Draw translucent models last // TODO, sort list by Z order to do translucency correctly GL_DEBUG("Remaining passes - translucent models"); for (unsigned i = 0; i < tshapes.size(); ++i) { pie_Draw3DShape2(tshapes[i].shape, tshapes[i].frame, tshapes[i].colour, tshapes[i].teamcolour, tshapes[i].flag, tshapes[i].flag_data, tshapes[i].matrix); } glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_NORMAL_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisable(GL_LIGHT0); pie_DeactivateShader(); glPopMatrix(); tshapes.resize(0); shapes.resize(0); GL_DEBUG("Remaining passes - done"); }