diff --git a/examples/glViewer/viewer.cpp b/examples/glViewer/viewer.cpp index 9d276bce..99fd3937 100644 --- a/examples/glViewer/viewer.cpp +++ b/examples/glViewer/viewer.cpp @@ -1269,7 +1269,7 @@ display() { GLuint diffuseColor = glGetUniformLocation(program, "diffuseColor"); - if (g_displayPatchColor) { + if (g_displayPatchColor and primType == GL_PATCHES) { float const * color = getAdaptivePatchColor( desc ); glProgramUniform4f(program, diffuseColor, color[0], color[1], color[2], color[3]); } else { @@ -1670,7 +1670,7 @@ initHUD() } for (int i = 0; i < (int)g_defaultShapes.size(); ++i) { - g_hud.AddRadioButton(4, g_defaultShapes[i].name.c_str(), i==0, -220, 10+i*16, callbackModel, i, 'n'); + g_hud.AddRadioButton(4, g_defaultShapes[i].name.c_str(), i==g_currentShape, -220, 10+i*16, callbackModel, i, 'n'); } }