Skip to content

Commit

Permalink
Debug|Unix: Investigating Canvas recreation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Feb 12, 2014
1 parent 071321a commit e0483c2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doomsday/client/include/gl/gl_main.h
Expand Up @@ -314,6 +314,8 @@ void GL_CalcLuminance(uint8_t const *buffer, int width, int height, int comps,
colorpaletteid_t paletteId, float *brightX, float *brightY,
struct ColorRawf_s *color, float *lumSize);

void DGL_AssertNotInPrimitive(void);

// Console commands.
D_CMD(UpdateGammaRamp);

Expand Down
5 changes: 5 additions & 0 deletions doomsday/client/src/gl/dgl_draw.cpp
Expand Up @@ -297,6 +297,11 @@ DENG_EXTERN_C void DGL_Begin(dglprimtype_t mode)
DGL_QUAD_STRIP ? GL_QUAD_STRIP : GL_QUADS);
}

void DGL_AssertNotInPrimitive(void)
{
DENG_ASSERT(!inPrim);
}

#undef DGL_End
DENG_EXTERN_C void DGL_End(void)
{
Expand Down
6 changes: 6 additions & 0 deletions doomsday/client/src/ui/clientwindow.cpp
Expand Up @@ -691,7 +691,11 @@ Canvas &ClientWindow::windowCanvas()

void ClientWindow::drawWindowContent()
{
LIBGUI_ASSERT_GL_OK();

root().draw();

LIBGUI_ASSERT_GL_OK();
}

ClientRootWidget &ClientWindow::root()
Expand Down Expand Up @@ -851,6 +855,7 @@ bool ClientWindow::setDefaultGLFormat() // static
fmt.setStereo(true);
}

/*
if(CommandLine_Exists("-novsync") || !Con_GetByte("vid-vsync"))
{
fmt.setSwapInterval(0); // vsync off
Expand All @@ -861,6 +866,7 @@ bool ClientWindow::setDefaultGLFormat() // static
fmt.setSwapInterval(1);
LOG_GL_VERBOSE("Vertical sync on");
}
*/

// The value of the "vid-fsaa" variable is written to this settings
// key when the value of the variable changes.
Expand Down
4 changes: 4 additions & 0 deletions doomsday/libappfw/src/vrwindowtransform.cpp
Expand Up @@ -113,7 +113,9 @@ DENG2_PIMPL(VRWindowTransform)

void drawContent() const
{
LIBGUI_ASSERT_GL_OK();
self.window().drawWindowContent();
LIBGUI_ASSERT_GL_OK();
}

/**
Expand Down Expand Up @@ -337,6 +339,8 @@ DENG2_PIMPL(VRWindowTransform)
// Restore default VR dynamic parameters
target().unsetActiveRect(true);
vrCfg.setCurrentEye(VRConfig::NeitherEye);

LIBGUI_ASSERT_GL_OK();
}
};

Expand Down

0 comments on commit e0483c2

Please sign in to comment.