#include <string>
// -------------------------------------------------------------------------
-#ifdef @prj_NAME@_Windows
+#define @prj_NAME_OS@
+#ifdef @prj_NAME_OS@
# define cpExtensions_STRTOK( A, B, N ) strtok_s( A, B, N )
# define cpExtensions_SPRINTF( B, S, O ) sprintf_s( B, S, "%s", O );
-# define
-#else // @prj_NAME@_Windows
+#else // @prj_NAME_OS@
# define cpExtensions_STRTOK( A, B, N ) std::strtok( A, B )
# define cpExtensions_SPRINTF( B, S, O ) std::sprintf( B, "%s", O );
-#endif // @prj_NAME@_Windows
-
+#endif // @prj_NAME_OS@
// -------------------------------------------------------------------------
namespace cpPlugins_bash
SET(prj_NAME_LIB_PREFIX "")
SET(prj_NAME_LIB_EXT ".dll")
SET(prj_NAME_ENV_SEPARATOR ";")
- SET(prj_NAME_PATH_SEPARATOR "\\\\")
+ SET(prj_NAME_PATH_SEPARATOR "\\\\\\\\")
ENDIF("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
## eof - $RCSfile$
## ====================
## == Find libraries ==
## ====================
-
SET(
_all_libs
"@cpPlugins_tinyxml2_LIB@"
ImageSliceMapper( )
: Superclass( )
{
+#ifdef cpPlugins_OpenGL_BackEnd_OpenGL2
// Complete polydatas to avoid bizarre rendering errors (multi-thread)
vtkActor* a[ 3 ];
a[ 0 ] = this->PolyDataActor;
} // fi
} // rof
+#endif // cpPlugins_OpenGL_BackEnd_OpenGL2
}
// -------------------------------------------------------------------------
void cpExtensions::Visualization::LUTImageActor::
SetLUTColor( unsigned int id, double r, double g, double b, double a )
{
- if( id >= this->m_LUT->GetNumberOfTableValues( ) )
+ if( id >= ( unsigned int )( this->m_LUT->GetNumberOfTableValues( ) ) )
this->m_LUT->SetNumberOfTableValues( id + 1 );
this->m_LUT->SetTableValue( id, r, g, b, a );
this->m_LUT->Modified( );
#define @prj_NAME@_ENV_SEPARATOR "@prj_NAME_ENV_SEPARATOR@"
#define @prj_NAME@_PATH_SEPARATOR "@prj_NAME_PATH_SEPARATOR@"
-#ifdef @prj_NAME@_Windows
+#ifdef @prj_NAME@_OS_Windows
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# define NOMINMAX
# include <windows.h>
# include <tchar.h>
-#endif
+#endif // @prj_NAME@_OS_Windows
/*
* =========================================================================
#define @prj_NAME@_RELEASE_VERSION @prj_REL_VER@
#define @prj_NAME@_VERSION "@prj_VERSION@"
#define @prj_NAME@_SHORT_VERSION "@prj_SHORT_VERSION@"
+#define @prj_NAME@_OpenGL_BackEnd_@VTK_RENDERING_BACKEND@
/*
* =========================================================================
# define @prj_NAME@_NOEXCEPT noexcept
# define @prj_NAME@_HAS_CXX11_STATIC_ASSERT
# define @prj_NAME@_HAS_CXX11_RVREF
-#else
+#else // __cplusplus >= 201103L
# define @prj_NAME@_OVERRIDE
# define @prj_NAME@_DELETE_FUNCTION
# define @prj_NAME@_NULLPTR NULL
# define @prj_NAME@_NOEXCEPT throw()
-#endif
+#endif // __cplusplus >= 201103L
/*
* =========================================================================
void cpPlugins::DataObjects::Image::
SetVTK( vtkObjectBase* o )
{
- vtkImageData* img = dynamic_cast< vtkImageData* >( img );
+ vtkImageData* img = dynamic_cast< vtkImageData* >( o );
this->Superclass::SetVTK( img );
if( img == NULL )
{
Plugins( )
: Superclass( )
{
+#ifdef cpPlugins_OS_Windows
+ char* p;
+ size_t size;
+ _dupenv_s( &p, &size, cpPlugins_PATHS );
+#else // cpPlugins_OS_Windows
char* p = std::getenv( cpPlugins_PATHS );
+#endif // cpPlugins_OS_Windows
std::stringstream str;
if( p != NULL )
str << p << cpPlugins_ENV_SEPARATOR;