Permalink
Browse files

Merge pull request #56 from tobiasrau/from_pub

From pub
  • Loading branch information...
tobiasrau committed Oct 4, 2017
2 parents c164e4d + 9ade0d1 commit 294e33af099027d6cfac705cc429a0719baee6c1
Showing with 10 additions and 10 deletions.
  1. +2 −2 core/src/LuaState.cpp
  2. +8 −8 plugins/infovis/src/NGParallelCoordinatesRenderer2D.cpp
View
@@ -640,13 +640,13 @@ UINT megamol::core::LuaState::parseLevelAttribute(const std::string attr) {
int megamol::core::LuaState::GetProcessID(lua_State *L) {
if (this->checkRunning("mmGetProcessID")) {
// if (this->checkRunning("mmGetProcessID")) {
vislib::StringA str;
unsigned int id = vislib::sys::Process::CurrentID();
str.Format("%u", id);
lua_pushstring(L, str.PeekBuffer());
return 1;
}
// }
}
@@ -447,7 +447,7 @@ int NGParallelCoordinatesRenderer2D::mouseXtoAxis(float x) {
float f = (x - this->marginX) / this->axisDistance;
float frac = f - static_cast<long>(f);
int integral = static_cast<int>(std::round(f));
if (integral >= this->columnCount || integral < 0) return -1;
if (integral >= static_cast<int>(this->columnCount) || integral < 0) return -1;
if (frac > 0.8 || frac < 0.2) {
//vislib::sys::Log::DefaultLog.WriteInfo("picking axis %i at mouse position of axis %i", axisIndirection[integral], integral);
return axisIndirection[integral];
@@ -581,7 +581,7 @@ bool NGParallelCoordinatesRenderer2D::resetFlagsSlotCallback(::megamol::core::pa
}
bool NGParallelCoordinatesRenderer2D::resetFiltersSlotCallback(::megamol::core::param::ParamSlot & caller) {
for (auto i = 0; i < this->columnCount; i++) {
for (GLuint i = 0; i < this->columnCount; i++) {
this->filters[i].lower = 0.0f;
this->filters[i].upper = 1.0f;
}
@@ -705,7 +705,7 @@ void NGParallelCoordinatesRenderer2D::drawAxes(void) {
int currAxis = mouseXtoAxis(mouseX);
//printf("trying to drag to axis %i\n", currAxis);
if (currAxis != pickedAxis && currAxis >= 0 && currAxis < this->columnCount) {
if (currAxis != pickedAxis && currAxis >= 0 && currAxis < static_cast<int>(this->columnCount)) {
for (auto ax = this->axisIndirection.begin(), e = this->axisIndirection.end(); ax != e; ax++) {
if (*ax == pickedAxis) {
this->axisIndirection.erase(ax);
@@ -956,11 +956,11 @@ void NGParallelCoordinatesRenderer2D::drawItemsHistogram(void) {
void NGParallelCoordinatesRenderer2D::drawParcos(void) {
// TODO only when filters changed!
size_t groups = this->itemCount / (filterWorkgroupSize[0] * filterWorkgroupSize[1] * filterWorkgroupSize[2]);
GLuint groups = this->itemCount / (filterWorkgroupSize[0] * filterWorkgroupSize[1] * filterWorkgroupSize[2]);
GLuint groupCounts[3] = {
(groups % maxWorkgroupCount[0]) + 1u
, (groups / maxWorkgroupCount[0]) + 1u
, 1u
(groups % maxWorkgroupCount[0]) + 1
, (groups / maxWorkgroupCount[0]) + 1
, 1
};
this->enableProgramAndBind(this->filterProgram);
filterProgram.Dispatch(groupCounts[0], groupCounts[1], groupCounts[2]);
@@ -981,7 +981,7 @@ void NGParallelCoordinatesRenderer2D::drawParcos(void) {
this->densityFBO.GetWidth() != windowWidth || this->densityFBO.GetHeight() != windowHeight) {
densityFBO.Release();
ok = densityFBO.Create(windowWidth, windowHeight, GL_R32F, GL_RED, GL_FLOAT);
MAKE_OBJECT_LABEL(GL_TEXTURE, densityFBO.GetColourTextureID(), "densityFBO");
MAKE_OBJECT_LABEL_EXPLICIT(GL_TEXTURE, densityFBO.GetColourTextureID(), "densityFBO");
}
if (ok) {
densityFBO.Enable();

0 comments on commit 294e33a

Please sign in to comment.