Notice: If you are member of any public project or group, please make sure that your GitLab username is not the same as the LRZ identifier/Kennung (see https://gitlab.lrz.de/profile/account). Please change your username if necessary. For more information see the section "Public projects / Öffentliche Projekte" at https://doku.lrz.de/display/PUBLIC/GitLab . Thank you!

Commit 3a2fa399 authored by Jakob Weiss's avatar Jakob Weiss Committed by Michael Sommersperger

Necessary fixes for VS 2017 build

parent 59d1c4fb
# = CAMPVis - Yet another medical visualization framework =====================
PROJECT(CAMPVis)
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2 FATAL_ERROR)
cmake_policy(SET CMP0020 NEW)
PROJECT(CAMPVis)
SET(CAMPVIS_VERSION 1.0.0)
# = Global Build Options ======================================================
......
......@@ -36,6 +36,8 @@ IF (WIN32)
SET(TbbCompilerDirectory "vc12")
ELSEIF(CAMPVIS_MSVC14)
SET(TbbCompilerDirectory "vc14")
ELSEIF(CAMPVIS_MSVC15)
SET(TbbCompilerDirectory "vc14")
ELSE()
MESSAGE(WARNING "Compiler not supported by makefile, you might be able to fix that...")
ENDIF(CAMPVIS_MSVC2010)
......
......@@ -58,7 +58,11 @@ ELSEIF(${CMAKE_GENERATOR} STREQUAL "Visual Studio 12 Win64" OR ${CMAKE_GENERATOR
ELSEIF(${CMAKE_GENERATOR} STREQUAL "Visual Studio 14 Win64" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 14 2015 Win64")
SET(CAMPVIS_MSVC14 TRUE)
SET(CAMPVIS_WIN64 TRUE)
MESSAGE("Visual Studio 12 Build (64 Bit)")
MESSAGE("Visual Studio 14 Build (64 Bit)")
ELSEIF(${CMAKE_GENERATOR} STREQUAL "Visual Studio 15 Win64" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 15 2017 Win64")
SET(CAMPVIS_MSVC15 TRUE)
SET(CAMPVIS_WIN64 TRUE)
MESSAGE("Visual Studio 15 Build (64 Bit)")
ELSEIF(${CMAKE_GENERATOR} MATCHES "NMake")
SET(CAMPVIS_NMAKE TRUE)
......
......@@ -64,9 +64,9 @@ namespace campvis {
const std::string& name,
const std::string& title,
const T& value,
const T& minValue = T(0.0f),
const T& maxValue = T(1.0f),
const T& stepValue = T(0.01f))
const T& minValue,
const T& maxValue,
const T& stepValue)
: Vec4Property(name, title, value, minValue, maxValue, stepValue)
{
......
......@@ -29,6 +29,7 @@ SET(CGT_SOURCES
frustum.cpp
glcanvas.cpp
glcontextmanager.cpp
gltextureformattraits.cpp
gpucapabilities.cpp
gpucapabilitieswindows.cpp
imageunit.cpp
......
This diff is collapsed.
......@@ -31,6 +31,7 @@
#include <GL/glew.h>
#include <string>
#include <cgt/types.h>
namespace cgt {
......@@ -67,7 +68,7 @@ public:
, glslFormatQualifier_{ glslFormatQualifier__ }
{};
static constexpr GLTextureFormatTraits get(GLint internalFormat);
CGT_API static GLTextureFormatTraits get(GLint internalFormat);
/**
* Whether the specified GLint is a valid internal format. If this is
......@@ -146,95 +147,4 @@ private:
};
#define defFormat(INTERNAL_FORMAT, BPP, CHANNELS, PIXEL_FORMAT, PIXEL_DATA_TYPE, GLSL_FORMAT_QUALIFIER) \
(internalFormat == INTERNAL_FORMAT) ? GLTextureFormatTraits(INTERNAL_FORMAT, #INTERNAL_FORMAT, BPP, CHANNELS, PIXEL_FORMAT, PIXEL_DATA_TYPE, GLSL_FORMAT_QUALIFIER) :
constexpr GLTextureFormatTraits GLTextureFormatTraits::get(GLint internalFormat)
{
return
defFormat(GL_DEPTH_COMPONENT , 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT , "**UNKNOWN**")
defFormat(GL_R8 , 1, 1, GL_RED , GL_UNSIGNED_BYTE , "r8")
defFormat(GL_R8_SNORM , 1, 1, GL_RED , GL_BYTE , "r8_snorm")
defFormat(GL_R8I , 1, 1, GL_RED_INTEGER , GL_BYTE , "r8i")
defFormat(GL_R8UI , 1, 1, GL_RED_INTEGER , GL_UNSIGNED_BYTE , "r8ui")
defFormat(GL_R3_G3_B2 , 1, 3, GL_RGB , GL_FLOAT , "**UNKNOWN**")
defFormat(GL_RGBA2 , 1, 4, GL_RGB , GL_UNSIGNED_BYTE , "**UNKNOWN**")
// , bpp, chn, pixel_format , pixel_data_type, "**UNKNOWN**");
defFormat(GL_DEPTH_COMPONENT16 , 2, 1, GL_DEPTH_COMPONENT, GL_FLOAT , "**UNKNOWN**")
defFormat(GL_R16 , 2, 1, GL_RED , GL_UNSIGNED_SHORT, "r16")
defFormat(GL_R16_SNORM , 2, 1, GL_RED , GL_SHORT , "r16_snorm")
defFormat(GL_R16F , 2, 1, GL_RED , GL_FLOAT , "r16f")
defFormat(GL_R16I , 2, 1, GL_RED_INTEGER , GL_SHORT , "r16i")
defFormat(GL_R16UI , 2, 1, GL_RED_INTEGER , GL_UNSIGNED_SHORT, "r16ui")
defFormat(GL_DEPTH_STENCIL , 2, 1, GL_RG , GL_FLOAT , "**UNKNOWN**")
defFormat(GL_RG8 , 2, 2, GL_RG , GL_UNSIGNED_BYTE , "rg8")
defFormat(GL_RG8_SNORM , 2, 2, GL_RG , GL_BYTE , "rg8_snorm")
defFormat(GL_RG8I , 2, 2, GL_RG_INTEGER , GL_BYTE , "rg8i")
defFormat(GL_RG8UI , 2, 2, GL_RG_INTEGER , GL_UNSIGNED_BYTE , "rg8ui")
defFormat(GL_RGB4 , 2, 3, GL_RGB , GL_UNSIGNED_BYTE , "**UNKNOWN**")
defFormat(GL_RGB5 , 2, 3, GL_RGB , GL_FLOAT , "**UNKNOWN**")
defFormat(GL_RGBA4 , 2, 4, GL_RGBA , GL_UNSIGNED_BYTE , "**UNKNOWN**")
defFormat(GL_RGB5_A1 , 2, 4, GL_RGBA , GL_FLOAT , "**UNKNOWN**")
// , bpp, chn, pixel_format , pixel_data_type, "**UNKNOWN**");
defFormat(GL_DEPTH_COMPONENT24 , 3, 1, GL_DEPTH_COMPONENT, GL_FLOAT , "**UNKNOWN**")
defFormat(GL_RGB8 , 3, 3, GL_RGB , GL_UNSIGNED_BYTE , "**UNKNOWN**")
defFormat(GL_RGB8_SNORM , 3, 3, GL_RGB , GL_BYTE , "**UNKNOWN**")
defFormat(GL_SRGB8 , 3, 3, GL_RGB , GL_UNSIGNED_BYTE , "**UNKNOWN**")
defFormat(GL_RGB8I , 3, 3, GL_RGB_INTEGER , GL_BYTE , "**UNKNOWN**")
defFormat(GL_RGB8UI , 3, 3, GL_RGB_INTEGER , GL_UNSIGNED_BYTE , "**UNKNOWN**")
// , bpp, chn, pixel_format , pixel_data_type, "**UNKNOWN**");
defFormat(GL_DEPTH_COMPONENT32 , 4, 1, GL_DEPTH_COMPONENT, GL_FLOAT , "**UNKNOWN**")
defFormat(GL_DEPTH_COMPONENT32F , 4, 1, GL_DEPTH_COMPONENT, GL_FLOAT , "**UNKNOWN**")
defFormat(GL_R32F , 4, 1, GL_RED , GL_FLOAT , "r32f")
defFormat(GL_R32I , 4, 1, GL_RED_INTEGER , GL_INT , "r32i")
defFormat(GL_R32UI , 4, 1, GL_RED_INTEGER , GL_UNSIGNED_INT , "r32ui")
defFormat(GL_RG16 , 4, 2, GL_RG , GL_UNSIGNED_SHORT, "rg16")
defFormat(GL_RG16_SNORM , 4, 2, GL_RG , GL_SHORT , "rg16_snorm")
defFormat(GL_RG16F , 4, 2, GL_RG , GL_FLOAT , "rg16f")
defFormat(GL_RG16I , 4, 2, GL_RG_INTEGER , GL_SHORT , "rg16i")
defFormat(GL_RG16UI , 4, 2, GL_RG_INTEGER , GL_UNSIGNED_SHORT, "rg16ui")
defFormat(GL_RGB10 , 4, 3, GL_RGB , GL_FLOAT , "**UNKNOWN**")
defFormat(GL_R11F_G11F_B10F , 4, 3, GL_RGB , GL_FLOAT , "r11f_g11f_b10f")
defFormat(GL_RGB9_E5 , 4, 3, GL_RGB , GL_FLOAT , "**UNKNOWN**")
defFormat(GL_RGBA8 , 4, 4, GL_RGBA , GL_UNSIGNED_BYTE , "rgba8")
defFormat(GL_RGBA8_SNORM , 4, 4, GL_RGBA , GL_BYTE , "rgba8_snorm")
defFormat(GL_RGB10_A2 , 4, 4, GL_RGBA , GL_FLOAT , "rgb10_a2")
defFormat(GL_RGB10_A2UI , 4, 4, GL_RGBA_INTEGER , GL_FLOAT , "rgb10_a2ui")
defFormat(GL_SRGB8_ALPHA8 , 4, 4, GL_RGBA , GL_UNSIGNED_BYTE , "**UNKNOWN**")
defFormat(GL_RGBA8I , 4, 4, GL_RGBA_INTEGER , GL_BYTE , "rgba8i")
defFormat(GL_RGBA8UI , 4, 4, GL_RGBA_INTEGER , GL_UNSIGNED_BYTE , "rgba8ui")
// , bpp, chn, pixel_format , pixel_data_type, "**UNKNOWN**");
defFormat(GL_RGB12 , 5, 3, GL_RGB , GL_FLOAT , "**UNKNOWN**")
// , bpp, chn, pixel_format , pixel_data_type, "**UNKNOWN**");
defFormat(GL_RGB16 , 6, 3, GL_RGB , GL_UNSIGNED_SHORT, "**UNKNOWN**")
defFormat(GL_RGB16_SNORM , 6, 3, GL_RGB , GL_SHORT , "**UNKNOWN**")
defFormat(GL_RGB16F , 6, 3, GL_RGB , GL_FLOAT , "**UNKNOWN**")
defFormat(GL_RGB16I , 6, 3, GL_RGB_INTEGER , GL_SHORT , "**UNKNOWN**")
defFormat(GL_RGB16UI , 6, 3, GL_RGB_INTEGER , GL_UNSIGNED_SHORT, "**UNKNOWN**")
defFormat(GL_RGBA12 , 6, 4, GL_RGBA , GL_FLOAT , "**UNKNOWN**")
// , bpp, chn, pixel_format , pixel_data_type, "**UNKNOWN**");
defFormat(GL_RG32F , 8, 2, GL_RG , GL_FLOAT , "rg32f")
defFormat(GL_RG32I , 8, 2, GL_RG_INTEGER , GL_INT , "rg32i")
defFormat(GL_RG32UI , 8, 2, GL_RG_INTEGER , GL_UNSIGNED_INT , "rg32ui")
defFormat(GL_RGBA16 , 8, 4, GL_RGBA , GL_FLOAT , "rgba16")
defFormat(GL_RGBA16_SNORM , 8, 4, GL_RGBA , GL_SHORT , "rgba16_snorm")
defFormat(GL_RGBA16F , 8, 4, GL_RGBA , GL_FLOAT , "rgba16f")
defFormat(GL_RGBA16I , 8, 4, GL_RGBA_INTEGER , GL_SHORT , "rgba16i")
defFormat(GL_RGBA16UI , 8, 4, GL_RGBA_INTEGER , GL_UNSIGNED_SHORT, "rgba16ui")
// , bpp, chn, pixel_format , pixel_data_type, "**UNKNOWN**");
defFormat(GL_RGB32F , 12, 3, GL_RGB , GL_FLOAT , "**UNKNOWN**")
defFormat(GL_RGB32I , 12, 3, GL_RGB_INTEGER , GL_INT , "**UNKNOWN**")
defFormat(GL_RGB32UI , 12, 3, GL_RGB_INTEGER , GL_UNSIGNED_INT , "**UNKNOWN**")
// , bpp, chn, pixel_format , pixel_data_type, "**UNKNOWN**");
defFormat(GL_RGBA32F , 16, 4, GL_RGBA , GL_FLOAT , "rgba32f")
defFormat(GL_RGBA32I , 16, 4, GL_RGBA_INTEGER , GL_INT , "rgba32i")
defFormat(GL_RGBA32UI , 16, 4, GL_RGBA_INTEGER , GL_UNSIGNED_INT , "rgba32ui")
// default case:
GLTextureFormatTraits(internalFormat);
}
#undef defFormat
}; // namspace cgt
\ No newline at end of file
}; // namspace cgt
......@@ -33,6 +33,23 @@
namespace sigslot {
// signal used to detect that the signal queue has been flushed
class SIGSLOT_API flushed_signal : public _signal_handle_base {
public:
flushed_signal(bool* ptr)
: _ptr(ptr)
{}
~flushed_signal() {}
virtual void processSignal() const {
*_ptr = true;
}
private:
bool* _ptr;
};
signal_manager::signal_manager()
: RunnableWithConditionalWait("sigslot::signal_manager")
, _handlingMode(DEFAULT)
......@@ -103,23 +120,6 @@ namespace sigslot {
// nothing to wait for if current thread is signal_manager's thread.
if (isCurrentThreadSignalManagerThread())
return;
// signal used to detect that the signal queue has been flushed
class SIGSLOT_API flushed_signal : public _signal_handle_base {
public:
flushed_signal(bool* ptr)
: _ptr(ptr)
{}
~flushed_signal() {}
virtual void processSignal() const {
*_ptr = true;
}
private:
bool* _ptr;
};
bool signalVariable = false;
this->queueSignalImpl(new flushed_signal(&signalVariable));
......
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