2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 9c2d29ba authored by schultezub's avatar schultezub
Browse files

fixed builds outside source directory not finding GLSL shaders

fixed further 64bit warnings

git-svn-id: https://camplinux.in.tum.de/svn/campvis/trunk@479 bb408c1c-ae56-11e1-83d9-df6b3e0c105e
parent b7ebbcb4
......@@ -44,18 +44,21 @@ SET(CampvisApplicationToBeMocced
gui/properties/transferfunctionpropertywidget.h
)
LIST(APPEND CampvisApplicationDefinitions "-DCAMPVIS_SOURCE_DIR=\"${CampvisHome}\"")
#
# Qt related stuff:
#
FIND_PACKAGE(Qt4 ${CampvisRequiredQtVersion} REQUIRED QtCore QtGui QtOpenGL)
QT4_WRAP_CPP(CampvisApplicationMoc ${CampvisApplicationToBeMocced})
LIST(APPEND CampvisApplicationSources ${CampvisApplicationMoc})
INCLUDE(${QT_USE_FILE})
ADD_EXECUTABLE(campvis-application
${CampvisApplicationSources} ${CampvisApplicationHeaders}
${CampvisApplicationMoc}
)
ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${CampvisModulesDefinitions} ${QT_DEFINITIONS})
ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${CampvisModulesDefinitions} ${CampvisApplicationDefinitions} ${QT_DEFINITIONS})
INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs} ${CampvisModulesIncludeDirs})
TARGET_LINK_LIBRARIES(campvis-application campvis-core campvis-modules tgt ${CampvisGlobalExternalLibs} ${CampvisModulesExternalLibs} ${QT_LIBRARIES})
......@@ -130,6 +130,14 @@ namespace campvis {
ShdrMgr.addPath(basePath);
ShdrMgr.addPath(basePath + "/core/glsl");
#ifdef CAMPVIS_SOURCE_DIR
{
std::string sourcePath = CAMPVIS_SOURCE_DIR;
ShdrMgr.addPath(sourcePath);
ShdrMgr.addPath(sourcePath + "/core/glsl");
}
#endif
#ifdef HAS_KISSCL
if (_useOpenCL) {
CLRtm.addPath(basePath);
......
......@@ -128,7 +128,7 @@ namespace campvis {
void ImageRepresentationRenderTarget::activate() {
_fbo->activate();
glViewport(0, 0, getSize().x, getSize().y);
glViewport(0, 0, static_cast<GLsizei>(getSize().x), static_cast<GLsizei>(getSize().y));
}
void ImageRepresentationRenderTarget::deactivate() {
......@@ -217,7 +217,7 @@ namespace campvis {
LWARNING("Tried to attach more color textures to FBO than supported, aborted.");
return;
}
attachment = GL_COLOR_ATTACHMENT0 + _colorTextures.size();
attachment = static_cast<GLenum>(GL_COLOR_ATTACHMENT0 + _colorTextures.size());
break;
case GL_DEPTH_COMPONENT16:
......
......@@ -209,7 +209,7 @@ namespace campvis {
void campvis::GenericOptionProperty<T>::selectById(const std::string& id) {
for (size_t i = 0; i < _options.size(); ++i) {
if (_options[i]._id == id) {
setValue(i);
setValue(static_cast<int>(i));
return;
}
}
......
......@@ -68,7 +68,7 @@ namespace campvis {
// this is a simple round-robing scheduling between all contexts:
bool hadWork = false;
// TODO: consider only non-empty context queues here
clock_t maxTimePerContext = 30 / _contexts.size();
clock_t maxTimePerContext = static_cast<clock_t>(30 / _contexts.size());
for (size_t i = 0; i < _contexts.size(); ++i) {
clock_t startTimeCurrentContext = clock() * 1000 / CLOCKS_PER_SEC;
......
......@@ -186,10 +186,12 @@ namespace campvis {
}
catch (tgt::Exception& e) {
LERROR("Error while parsing MHD header: " << e.what());
validate(INVALID_RESULT);
return;
}
catch (std::exception& e) {
LERROR("Error while parsing MHD header: " << e.what());
validate(INVALID_RESULT);
return;
}
......
......@@ -103,7 +103,7 @@ namespace campvis {
}
// compute confidence map
_cmGenerator.setImage(inputValues, _input->getSize().y, _input->getSize().x, _processor->p_alpha.getValue(), _processor->p_normalizeValues.getValue());
_cmGenerator.setImage(inputValues, static_cast<int>(_input->getSize().y), static_cast<int>(_input->getSize().x), _processor->p_alpha.getValue(), _processor->p_normalizeValues.getValue());
std::vector<double> tmp = _cmGenerator.computeMap(_processor->p_beta.getValue(), _processor->p_gamma.getValue());
// copy back
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment