Skip to content

Commit

Permalink
Cleanup|Client|GL: Busy mode not needed at startup; removed dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Feb 7, 2017
1 parent 739e012 commit 1dc04e5
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 304 deletions.
2 changes: 1 addition & 1 deletion doomsday/apps/client/include/gl/gl_main.h
Expand Up @@ -196,7 +196,7 @@ void GL_SetVSync(dd_bool on);
*
* @param on @c true to enable multisampling, @c false to disable.
*/
void GL_SetMultisample(dd_bool on);
//void GL_SetMultisample(dd_bool on);

/**
* Reconfigure GL fog according to the setup defined in the specified @a mapInfo definition.
Expand Down
18 changes: 10 additions & 8 deletions doomsday/apps/client/src/dd_main.cpp
Expand Up @@ -189,7 +189,7 @@ class WadFileType : public de::NativeFileType
};

static dint DD_StartupWorker(void *context);
static dint DD_DummyWorker(void *context);
//static dint DD_DummyWorker(void *context);

dint isDedicated;
dint verbose; ///< For debug messages (-verbose).
Expand Down Expand Up @@ -1036,8 +1036,9 @@ static void initialize()
// Enter busy mode until startup complete.
Con_InitProgress(200);
#endif
BusyMode_RunNewTaskWithName(BUSYF_NO_UPLOADS | BUSYF_STARTUP | BUSYF_PROGRESS_BAR | (verbose? BUSYF_CONSOLE_OUTPUT : 0),
DD_StartupWorker, 0, "Starting up...");
/*BusyMode_RunNewTaskWithName(BUSYF_NO_UPLOADS | BUSYF_STARTUP | BUSYF_PROGRESS_BAR | (verbose? BUSYF_CONSOLE_OUTPUT : 0),
DD_StartupWorker, 0, "Starting up...");*/
DD_StartupWorker(nullptr);

// Engine initialization is complete. Now finish up with the GL.
#ifdef __CLIENT__
Expand All @@ -1048,12 +1049,13 @@ static void initialize()
#endif
App_Resources().initSystemTextures();

#ifdef __CLIENT__
/*#ifdef __CLIENT__
// Do deferred uploads.
Con_SetProgress(100);
#endif
BusyMode_RunNewTaskWithName(BUSYF_STARTUP | BUSYF_PROGRESS_BAR | (verbose? BUSYF_CONSOLE_OUTPUT : 0),
DD_DummyWorker, 0, "Buffering...");
#endif*/
/*BusyMode_RunNewTaskWithName(BUSYF_STARTUP | BUSYF_PROGRESS_BAR | (verbose? BUSYF_CONSOLE_OUTPUT : 0),
DD_DummyWorker, 0, "Starting up...");
*/

//
// Try to locate all required data files for all registered games.
Expand Down Expand Up @@ -1382,7 +1384,7 @@ static dint DD_StartupWorker(void * /*context*/)
return 0;
}

#if 1
#if 0
/**
* This only exists so we have something to call while the deferred uploads of the
* startup are processed.
Expand Down
34 changes: 0 additions & 34 deletions doomsday/apps/client/src/gl/dgl_common.cpp
Expand Up @@ -330,40 +330,6 @@ void GL_SetVSync(dd_bool on)
DENG_ASSERT_GL_CONTEXT_ACTIVE();

GLInfo::setSwapInterval(on ? 1 : 0);

#if 0
#ifdef WIN32
{
//wglSwapIntervalEXT(on? 1 : 0);
}
#elif defined (MACOSX)
{
// Tell CGL to wait for vertical refresh.
CGLContextObj context = CGLGetCurrentContext();
DENG_ASSERT(context != nullptr);
if (context)
{
GLint params[1] = { on? 1 : 0 };
CGLSetParameter(context, kCGLCPSwapInterval, params);
}
}
#elif defined (Q_WS_X11)
{
//setXSwapInterval(on? 1 : 0);
}
#endif
#endif
}

void GL_SetMultisample(dd_bool on)
{
if(!GL_state.features.multisample) return;

DENG_ASSERT_IN_MAIN_THREAD();
DENG_ASSERT_GL_CONTEXT_ACTIVE();

/// @todo Do this via GLFramebuffer.
qDebug() << "GL_SetMultisample:" << on << "(not implemented)";
}

#undef DGL_SetScissor
Expand Down
4 changes: 2 additions & 2 deletions doomsday/apps/client/src/render/rend_main.cpp
Expand Up @@ -4673,7 +4673,7 @@ static void drawAllLists(Map &map)

void Rend_RenderMap(Map &map)
{
GL_SetMultisample(true);
//GL_SetMultisample(true);

// Setup the modelview matrix.
Rend_ModelViewMatrix();
Expand Down Expand Up @@ -4730,7 +4730,7 @@ void Rend_RenderMap(Map &map)
drawGenerators(map);
//drawBiasEditingVisuals(map);

GL_SetMultisample(false);
//GL_SetMultisample(false);
}

#if 0
Expand Down
3 changes: 1 addition & 2 deletions doomsday/apps/client/src/ui/clientwindow.cpp
Expand Up @@ -455,8 +455,7 @@ DENG2_PIMPL(ClientWindow)
GL_Init2DState();

// Update the capability flags.
GL_state.features.multisample = GLTextureFramebuffer::defaultMultisampling() > 1;
LOGDEV_GL_MSG("GL feature: Multisampling: %b") << GL_state.features.multisample;
LOGDEV_GL_MSG("GL feature: Multisampling: %b") << (GLTextureFramebuffer::defaultMultisampling() > 1);

if (vrCfg().needsStereoGLFormat() && !self().format().stereo())
{
Expand Down
4 changes: 2 additions & 2 deletions doomsday/apps/client/src/ui/infine/finalepagewidget.cpp
Expand Up @@ -153,7 +153,7 @@ void FinalePageWidget::draw() const
LIBGUI_GL.glPushMatrix();
//glLoadIdentity();

GL_SetMultisample(true);
//GL_SetMultisample(true);

// Clear Z buffer (prevent the objects being clipped by nearby polygons).
LIBGUI_GL.glClear(GL_DEPTH_BUFFER_BIT);
Expand Down Expand Up @@ -185,7 +185,7 @@ void FinalePageWidget::draw() const
GL_DrawRectf2Color(0, 0, SCREENWIDTH, SCREENHEIGHT, d->filter[0].value, d->filter[1].value, d->filter[2].value, d->filter[3].value);
}

GL_SetMultisample(false);
//GL_SetMultisample(false);

LIBGUI_GL.glMatrixMode(GL_MODELVIEW);
LIBGUI_GL.glPopMatrix();
Expand Down

0 comments on commit 1dc04e5

Please sign in to comment.