From a4e7dea9e3bf5e054782529a30f26cfa9c24f1c2 Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 27 May 2016 11:41:10 +0000 Subject: [PATCH] Remove "generating group 1/10" status message during generation. It's broken. It expects a valid OpenGL context during generation that immediately pushes changes to the screen. This is never true on non-Windows as offscreen rendering is used, and also incompatible with OpenGL core profile. Further, right now it displays junk on Windows as well due to some issue with the bitmap font texture loading. We will restore it later, in a saner form. --- src/generate.cpp | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/src/generate.cpp b/src/generate.cpp index 190b5b2e..8ab40c27 100644 --- a/src/generate.cpp +++ b/src/generate.cpp @@ -221,50 +221,9 @@ void SolveSpaceUI::GenerateAll(Generate type, bool andFindFree, bool genForBBox) SK.param.MoveSelfInto(&prev); SK.entity.Clear(); - int64_t inTime = GetMilliseconds(); - - bool displayedStatusMessage = false; for(i = 0; i < SK.groupOrder.n; i++) { Group *g = SK.GetGroup(SK.groupOrder.elem[i]); - int64_t now = GetMilliseconds(); - // Display the status message if we've taken more than 400 ms, or - // if we've taken 200 ms but we're not even halfway done, or if - // we've already started displaying the status message. - if( (now - inTime > 400) || - ((now - inTime > 200) && i < (SK.groupOrder.n / 2)) || - displayedStatusMessage) - { - displayedStatusMessage = true; - std::string msg = ssprintf("generating group %d/%d", i, SK.groupOrder.n); - - int w, h; - GetGraphicsWindowSize(&w, &h); - glDrawBuffer(GL_FRONT); - glViewport(0, 0, w, h); - glLoadIdentity(); - glTranslated(-1, 1, 0); - glScaled(2.0/w, 2.0/h, 1.0); - glDisable(GL_DEPTH_TEST); - - double left = 80, top = -20, width = 240, height = 24; - glColor3d(0.9, 0.8, 0.8); - ssglAxisAlignedQuad(left, left+width, top, top-height); - ssglLineWidth(1); - glColor3d(0.0, 0.0, 0.0); - ssglAxisAlignedLineLoop(left, left+width, top, top-height); - - ssglInitializeBitmapFont(); - glColor3d(0, 0, 0); - glPushMatrix(); - glTranslated(left+8, top-20, 0); - glScaled(1, -1, 1); - ssglBitmapText(msg, Vector::From(0, 0, 0)); - glPopMatrix(); - glFlush(); - glDrawBuffer(GL_BACK); - } - // The group may depend on entities or other groups, to define its // workplane geometry or for its operands. Those must already exist // in a previous group, so check them before generating.