bind new system information functions
This commit is contained in:
parent
321c09e471
commit
a8b9dcbf17
|
@ -21,10 +21,6 @@ SET(CXX_WARNS "-Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-but-set-v
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARNS} -std=gnu++0x -pipe")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARNS} -std=gnu++0x -pipe")
|
||||||
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb")
|
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb")
|
||||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -ggdb")
|
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -ggdb")
|
||||||
|
|
||||||
# -ffast-math => has historical behaviour that may cause the app to work incorrectly or crash
|
|
||||||
# -msse -msse2 -mfpmath=sse => I have experienced crashs with these optimizations on some windows machines
|
|
||||||
#SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -ffast-math -msse -msse2 -mfpmath=sse")
|
|
||||||
SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
||||||
|
|
||||||
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -static-libgcc -static-libstdc++ -Wl,--as-needed")
|
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -static-libgcc -static-libstdc++ -Wl,--as-needed")
|
||||||
|
|
|
@ -59,6 +59,8 @@ public:
|
||||||
|
|
||||||
int getForegroundPaneFps() { return m_foregroundFrameCounter.getLastFps(); }
|
int getForegroundPaneFps() { return m_foregroundFrameCounter.getLastFps(); }
|
||||||
int getBackgroundPaneFps() { return m_backgroundFrameCounter.getLastFps(); }
|
int getBackgroundPaneFps() { return m_backgroundFrameCounter.getLastFps(); }
|
||||||
|
int getForegroundPaneMaxFps() { return m_foregroundFrameCounter.getMaxFps(); }
|
||||||
|
int getBackgroundPaneMaxFps() { return m_backgroundFrameCounter.getMaxFps(); }
|
||||||
std::string getBuildCompiler() { return BUILD_COMPILER; }
|
std::string getBuildCompiler() { return BUILD_COMPILER; }
|
||||||
std::string getBuildDate() { return BUILD_DATE; }
|
std::string getBuildDate() { return BUILD_DATE; }
|
||||||
std::string getBuildRevision() { return BUILD_REVISION; }
|
std::string getBuildRevision() { return BUILD_REVISION; }
|
||||||
|
|
|
@ -55,6 +55,11 @@ public:
|
||||||
const Size& getViewportSize() { return m_viewportSize; }
|
const Size& getViewportSize() { return m_viewportSize; }
|
||||||
TexturePtr& getEmptyTexture() { return m_emptyTexture; }
|
TexturePtr& getEmptyTexture() { return m_emptyTexture; }
|
||||||
|
|
||||||
|
std::string getVendor() { return (const char*)glGetString(GL_VENDOR); }
|
||||||
|
std::string getRenderer() { return (const char*)glGetString(GL_RENDERER); }
|
||||||
|
std::string getVersion() { return (const char*)glGetString(GL_VERSION); }
|
||||||
|
std::string getExtensions() { return (const char*)glGetString(GL_EXTENSIONS); }
|
||||||
|
|
||||||
bool canUseDrawArrays();
|
bool canUseDrawArrays();
|
||||||
bool canUseShaders();
|
bool canUseShaders();
|
||||||
bool canUseFBO();
|
bool canUseFBO();
|
||||||
|
|
|
@ -477,6 +477,8 @@ void Application::registerLuaFunctions()
|
||||||
g_lua.bindClassStaticFunction("g_app", "getVersion", std::bind(&Application::getVersion, g_app));
|
g_lua.bindClassStaticFunction("g_app", "getVersion", std::bind(&Application::getVersion, g_app));
|
||||||
g_lua.bindClassStaticFunction("g_app", "getForegroundPaneFps", std::bind(&Application::getForegroundPaneFps, g_app));
|
g_lua.bindClassStaticFunction("g_app", "getForegroundPaneFps", std::bind(&Application::getForegroundPaneFps, g_app));
|
||||||
g_lua.bindClassStaticFunction("g_app", "getBackgroundPaneFps", std::bind(&Application::getBackgroundPaneFps, g_app));
|
g_lua.bindClassStaticFunction("g_app", "getBackgroundPaneFps", std::bind(&Application::getBackgroundPaneFps, g_app));
|
||||||
|
g_lua.bindClassStaticFunction("g_app", "getForegroundPaneMaxFps", std::bind(&Application::getForegroundPaneMaxFps, g_app));
|
||||||
|
g_lua.bindClassStaticFunction("g_app", "getBackgroundPaneMaxFps", std::bind(&Application::getBackgroundPaneMaxFps, g_app));
|
||||||
g_lua.bindClassStaticFunction("g_app", "getBuildCompiler", std::bind(&Application::getBuildCompiler, g_app));
|
g_lua.bindClassStaticFunction("g_app", "getBuildCompiler", std::bind(&Application::getBuildCompiler, g_app));
|
||||||
g_lua.bindClassStaticFunction("g_app", "getBuildDate", std::bind(&Application::getBuildDate, g_app));
|
g_lua.bindClassStaticFunction("g_app", "getBuildDate", std::bind(&Application::getBuildDate, g_app));
|
||||||
g_lua.bindClassStaticFunction("g_app", "getBuildRevision", std::bind(&Application::getBuildRevision, g_app));
|
g_lua.bindClassStaticFunction("g_app", "getBuildRevision", std::bind(&Application::getBuildRevision, g_app));
|
||||||
|
@ -548,6 +550,10 @@ void Application::registerLuaFunctions()
|
||||||
g_lua.bindClassStaticFunction("g_graphics", "isPainterEngineAvailable", std::bind(&Graphics::isPainterEngineAvailable, &g_graphics, std::placeholders::_1));
|
g_lua.bindClassStaticFunction("g_graphics", "isPainterEngineAvailable", std::bind(&Graphics::isPainterEngineAvailable, &g_graphics, std::placeholders::_1));
|
||||||
g_lua.bindClassStaticFunction("g_graphics", "selectPainterEngine", std::bind(&Graphics::selectPainterEngine, &g_graphics, std::placeholders::_1));
|
g_lua.bindClassStaticFunction("g_graphics", "selectPainterEngine", std::bind(&Graphics::selectPainterEngine, &g_graphics, std::placeholders::_1));
|
||||||
g_lua.bindClassStaticFunction("g_graphics", "getPainterEngine", std::bind(&Graphics::getPainterEngine, &g_graphics));
|
g_lua.bindClassStaticFunction("g_graphics", "getPainterEngine", std::bind(&Graphics::getPainterEngine, &g_graphics));
|
||||||
|
g_lua.bindClassStaticFunction("g_graphics", "getViewportSize", std::bind(&Graphics::getViewportSize, &g_graphics));
|
||||||
|
g_lua.bindClassStaticFunction("g_graphics", "getVendor", std::bind(&Graphics::getVendor, &g_graphics));
|
||||||
|
g_lua.bindClassStaticFunction("g_graphics", "getRenderer", std::bind(&Graphics::getRenderer, &g_graphics));
|
||||||
|
g_lua.bindClassStaticFunction("g_graphics", "getVersion", std::bind(&Graphics::getVersion, &g_graphics));
|
||||||
|
|
||||||
// Logger
|
// Logger
|
||||||
g_lua.registerStaticClass("g_logger");
|
g_lua.registerStaticClass("g_logger");
|
||||||
|
|
|
@ -857,4 +857,3 @@ std::string WIN32Window::getPlatformType()
|
||||||
{
|
{
|
||||||
return "WIN32-WGL";
|
return "WIN32-WGL";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue