Skip to content

Commit

Permalink
fix capitalization of cvars, remove glconsole defines
Browse files Browse the repository at this point in the history
  • Loading branch information
crheckman committed Apr 24, 2015
1 parent cb38fbd commit 9bf20a3
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ else()
endif()
endif()

find_package(CVARS 2.3 QUIET)
find_package(CVars 2.3 QUIET)
if(CVARS_FOUND)
set(HAVE_CVARS 1)
list(APPEND USER_INC ${CVars_INCLUDE_DIRS} )
Expand Down
12 changes: 6 additions & 6 deletions include/pangolin/compat/glconsole.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/

#ifndef PANGOLIN_COMPAT_GLCONSOLE_H
#define PANGOLIN_COMPAT_GLCONSOLE_H
#ifndef PANGOLIN_COMPAT_CVARS_H
#define PANGOLIN_COMPAT_CVARS_H

#include <pangolin/platform.h>

// If we don't have GLUT, coerce GLConsole to work with our own font rendering.
// If we don't have GLUT, coerce CVARS to work with our own font rendering.
#ifdef HAVE_GLES
#include <pangolin/glinclude.h>
#include <pangolin/glfont.h>

// Define our own GLFont class, preventing GLConsoles from being included.
// Define our own GLFont class, preventing CVARSs from being included.
#define __GL_FONT_H__

class GLFont
Expand Down Expand Up @@ -74,6 +74,6 @@ class GLFont

#endif // HAVE_GLES

#include <GLConsole/GLConsole.h>
#include <CVARS/CVARS.h>

#endif // PANGOLIN_COMPAT_GLCONSOLE_H
#endif // PANGOLIN_COMPAT_CVARS_H
10 changes: 5 additions & 5 deletions include/pangolin/display_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
#endif // BUILD_PANGOLIN_VIDEO

#ifdef HAVE_CVARS
#define HAVE_GLCONSOLE
#include <pangolin/compat/glconsole.h>
#define HAVE_CVARS
#include <pangolin/compat/CVARS.h>
#endif // HAVE_CVARS

namespace pangolin
Expand Down Expand Up @@ -86,9 +86,9 @@ struct PANGOLIN_EXPORT PangolinGl
VideoOutput recorder;
#endif

#ifdef HAVE_GLCONSOLE
GLConsole console;
#endif // HAVE_GLCONSOLE
#ifdef HAVE_CVARS
CVARS console;
#endif // HAVE_CVARS

};

Expand Down
38 changes: 19 additions & 19 deletions src/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ __thread PangolinGl* context = 0;
PangolinGl::PangolinGl()
: user_app(0), quit(false), mouse_state(0), activeDisplay(0)
{
#if defined(HAVE_GLCONSOLE) && defined(HAVE_GLES)
#if defined(HAVE_CVARS) && defined(HAVE_GLES)
console.m_fOverlayPercent = 0.5;
#endif
}
Expand Down Expand Up @@ -176,9 +176,9 @@ void PostRender()
DisplayBase().Activate();
Viewport::DisableScissor();

#ifdef HAVE_GLCONSOLE
#ifdef HAVE_CVARS
context->console.RenderConsole();
#endif // HAVE_GLCONSOLE
#endif // HAVE_CVARS
}

View& DisplayBase()
Expand Down Expand Up @@ -311,15 +311,15 @@ void SaveFramebuffer(VideoOutput& video, const Viewport& v)

bool CVarViewList( std::vector<std::string>* args )
{
#ifdef HAVE_GLCONSOLE
#ifdef HAVE_CVARS
std::stringstream ss;
for(ViewMap::iterator vi = context->named_managed_views.begin();
vi != context->named_managed_views.end(); ++vi)
{
ss << "'" << vi->first << "' " << std::endl;
}
context->console.EnterLogLine(ss.str().c_str());
#endif //HAVE_GLCONSOLE
#endif //HAVE_CVARS
return true;
}

Expand All @@ -328,9 +328,9 @@ bool CVarViewShowHide( std::vector<std::string>* args )
if(args && args->size() == 1) {
Display(args->at(0)).ToggleShow();
}else{
#ifdef HAVE_GLCONSOLE
#ifdef HAVE_CVARS
context->console.EnterLogLine("USAGE: pango.view.showhide view_name", LINEPROP_ERROR);
#endif //HAVE_GLCONSOLE
#endif //HAVE_CVARS
}
return true;
}
Expand All @@ -352,14 +352,14 @@ bool CVarScreencap( std::vector<std::string>* args )
view->SaveRenderNow(file_prefix, scale);
}

#ifdef HAVE_GLCONSOLE
#ifdef HAVE_CVARS
context->console.EnterLogLine("done.");
#endif // HAVE_GLCONSOLE
#endif // HAVE_DVARS
}else{
#ifdef HAVE_GLCONSOLE
#ifdef HAVE_CVARS
context->console.EnterLogLine("USAGE: pango.screencap file_prefix [scale=1] [view_name]", LINEPROP_ERROR);
context->console.EnterLogLine(" eg: pango.screencap my_shot", LINEPROP_ERROR);
#endif // HAVE_GLCONSOLE
#endif // HAVE_CVARS
}
return false;
}
Expand All @@ -377,20 +377,20 @@ bool CVarRecordStart( std::vector<std::string>* args )

try {
view->RecordOnRender(uri);
#ifdef HAVE_GLCONSOLE
#ifdef HAVE_CVARS
context->console.ToggleConsole();
#endif // HAVE_GLCONSOLE
#endif // HAVE_CVARS
return true;
}catch(VideoException e) {
#ifdef HAVE_GLCONSOLE
#ifdef HAVE_CVARS
context->console.EnterLogLine(e.what(), LINEPROP_ERROR );
#endif // HAVE_GLCONSOLE
#endif // HAVE_CVARS
}
}else{
#ifdef HAVE_GLCONSOLE
#ifdef HAVE_CVARS
context->console.EnterLogLine("USAGE: pango.record.start uri [view_name]", LINEPROP_ERROR);
context->console.EnterLogLine(" eg: pango.record.start ffmpeg://screencap.avi", LINEPROP_ERROR);
#endif // HAVE_GLCONSOLE
#endif // HAVE_CVARS
}
return false;
}
Expand Down Expand Up @@ -428,7 +428,7 @@ void Keyboard( unsigned char key, int x, int y)
if( key == GLUT_KEY_ESCAPE) {
context->quit = true;
}
#ifdef HAVE_GLCONSOLE
#ifdef HAVE_CVARS
else if(key == '`') {
context->console.ToggleConsole();
// Force refresh for several frames whilst panel opens/closes
Expand All @@ -441,7 +441,7 @@ void Keyboard( unsigned char key, int x, int y)
context->console.KeyboardFunc(key);
}
}
#endif // HAVE_GLCONSOLE
#endif // HAVE_CVARS
#ifdef HAVE_GLUT
else if( key == GLUT_KEY_TAB) {
ToggleFullscreen();
Expand Down

0 comments on commit 9bf20a3

Please sign in to comment.