Skip to content

Commit

Permalink
Debug|GL: Assert DGL_Enable/Disable/MatrixMode argument validity
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed May 7, 2015
1 parent ee72ed6 commit 2f39efa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions doomsday/apps/client/src/gl/dgl_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,9 @@ int DGL_Enable(int cap)
case DGL_POINT_SMOOTH:
glEnable(GL_POINT_SMOOTH);
break;

default:
DENG_ASSERT(!"DGL_Enable: Invalid cap");
return 0;
}

Expand Down Expand Up @@ -650,8 +651,9 @@ void DGL_Disable(int cap)
case DGL_POINT_SMOOTH:
glDisable(GL_POINT_SMOOTH);
break;

default:
DENG_ASSERT(!"DGL_Disable: Invalid cap");
break;
}
}
Expand Down Expand Up @@ -704,6 +706,7 @@ void DGL_MatrixMode(int mode)
{
DENG_ASSERT_IN_MAIN_THREAD();
DENG_ASSERT_GL_CONTEXT_ACTIVE();
DENG_ASSERT(mode == DGL_PROJECTION || mode == DGL_TEXTURE || mode == DGL_MODELVIEW);

glMatrixMode(mode == DGL_PROJECTION ? GL_PROJECTION :
mode == DGL_TEXTURE ? GL_TEXTURE :
Expand Down

0 comments on commit 2f39efa

Please sign in to comment.