Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/master' into release
Browse files Browse the repository at this point in the history
Conflicts:
	include/version.h
  • Loading branch information
febret committed Sep 25, 2015
2 parents 99e21e6 + 0132da9 commit 87325c9
Show file tree
Hide file tree
Showing 32 changed files with 763 additions and 377 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ before_install:
- sudo apt-get install -qq git || /bin/true
- sudo apt-get install -qq libgl1-mesa-dev || /bin/true
- sudo apt-get install -qq libglewmx1.6-dev || /bin/true
- sudo apt-get install -qq libxxf86vm-dev || /bin/true
- sudo chmod +x external/setup-travis.sh
- external/setup-travis.sh
28 changes: 16 additions & 12 deletions Authors.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
INSTITUTIONS
---------------------------------------
Work on Omegalib core and modules was supported by the following institutions:
The Electronic Visualization Lab, University of Illinois at Chicago
Northwestern University, Chicago
Monash University, Melbourne
Politecnico di Milano, Milan
The Electronic Visualization Lab at the University of Illinois at Chicago, Chicago, US
Northwestern University, Evanston, US
Monash University, Melbourne, Australia
Politecnico di Milano, Milan, Italy
Center for Visual Computing at Stony Brook University, Stony Brook, US


AUTHORS
Expand All @@ -13,28 +14,31 @@ Lead Developer:
Alessandro Febretti

Contributors:
Arthur Nishimoto
Dennis Chau
Victor Mateviitsi
Koosha Mirhosseini
Brad McGinnis
Dennis Chau
Arthur Nishimoto
JD Pirtle
Qi Sun

Module Contributors:
Jason Leigh
Andrew Johnson
Thomas Marrinan
David Barnes
Daniele Donghi
Andrew Johnson
Owen Kaluza
Andreas Limbera
Daniele Donghi
Jason Leigh
Thomas Marrinan
Matt McCrory
Alex Simes

Patch Contributors:
Shi Yin
Cai Shanli
J Markus Maunus
Jonathan Khoo
Cai Shanli
Connor Taffe
Shi Yin

Academic Supervisors:
Andrew Johnson
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ execute_process(
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)

if(CMAKE_GENERATOR STREQUAL "Xcode")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++" CACHE STRING "" FORCE)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -stdlib=libstdc++" CACHE STRING "" FORCE)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libstdc++" CACHE STRING "" FORCE)
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -stdlib=libstdc++" CACHE STRING "" FORCE)
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -stdlib=libstdc++" CACHE STRING "" FORCE)
endif(CMAKE_GENERATOR STREQUAL "Xcode")
#-------------------------------------------------------------------------------
# Create a build name depending on the OS, Toolset and architecture.
if(CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<img src="https://github.com/uic-evl/omegalib/wiki/intro/banner.jpg"/>

A framework for virtual reality and cluster-driven display systems.
A hybrid visualization framework for desktops, large immersive displays and the web.

- Intro page: http://uic-evl.github.io/omegalib/
- Wiki: https://github.com/uic-evl/omegalib/wiki
Expand Down
17 changes: 11 additions & 6 deletions external/UseEqualizer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ set(EQUALIZER_BASE_DIR ${CMAKE_BINARY_DIR}/3rdparty/equalizer)

# Equalizer support enabled: uncompress and prepare the external project.
if(APPLE)
string(REGEX MATCH "[0-9]+\\.[0-9]+" OSX_FAMILY ${CURRENT_OSX_VERSION} )
ExternalProject_Add(
equalizer
URL http://github.com/omega-hub/Equalizer-1.0.2/archive/master.tar.gz
Expand All @@ -12,14 +13,14 @@ if(APPLE)
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
#-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE}
-DCMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${CURRENT_OSX_VERSION}.sdk
-DCMAKE_OSX_DEPLOYMENT_TARGET:VAR=${CURRENT_OSX_VERSION}
-DCMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_FAMILY}.sdk
-DCMAKE_OSX_DEPLOYMENT_TARGET:VAR=${OSX_FAMILY}
-DEQUALIZER_PREFER_AGL:BOOL=OFF
-DEQUALIZER_USE_CUDA:BOOL=OFF
-DEQUALIZER_USE_BOOST:BOOL=OFF
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
INSTALL_COMMAND ""
PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/external/equalizer.${CURRENT_OSX_VERSION}.patch
PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/external/equalizer.${OSX_FAMILY}.patch
# directories
TMP_DIR ${CMAKE_BINARY_DIR}/3rdparty/tmp
STAMP_DIR ${CMAKE_BINARY_DIR}/3rdparty/stamp
Expand Down Expand Up @@ -79,14 +80,18 @@ if(WIN32)

else()
if(APPLE)
set(EQUALIZER_EQ_LIB_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libEqualizer.dylib)
set(EQUALIZER_CO_LIB_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libCollage.dylib)
set(EQUALIZER_EQ_LIB_DEBUG debug ${EQUALIZER_BINARY_DIR}/libs/client/Debug/libEqualizer.dylib)
set(EQUALIZER_CO_LIB_DEBUG debug ${EQUALIZER_BINARY_DIR}/libs/collage/Debug/libCollage.dylib)
set(EQUALIZER_EQ_LIB_RELEASE optimized ${EQUALIZER_BINARY_DIR}/libs/client/Release/libEqualizer.dylib)
set(EQUALIZER_CO_LIB_RELEASE optimized ${EQUALIZER_BINARY_DIR}/libs/collage/Release/libCollage.dylib)
else()
set(EQUALIZER_EQ_LIB_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libEqualizer.so)
set(EQUALIZER_CO_LIB_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libCollage.so)
set(EQUALIZER_EQ_LIB_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libEqualizer.so)
set(EQUALIZER_CO_LIB_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libCollage.so)
endif()
set(EQUALIZER_LIBS_DEBUG ${EQUALIZER_EQ_LIB_DEBUG} ${EQUALIZER_CO_LIB_DEBUG})
set(EQUALIZER_LIBS_RELEASE ${EQUALIZER_EQ_LIB_DEBUG} ${EQUALIZER_CO_LIB_DEBUG})
set(EQUALIZER_LIBS_RELEASE ${EQUALIZER_EQ_LIB_RELEASE} ${EQUALIZER_CO_LIB_RELEASE})
endif()
set(EQUALIZER_LIBS ${EQUALIZER_LIBS_DEBUG} ${EQUALIZER_LIBS_RELEASE})
set(EQUALIZER_INCLUDES ${EQUALIZER_BINARY_DIR}/include)
11 changes: 8 additions & 3 deletions external/UseOmicron.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,19 @@ else()

###################################################################################################
# Set the output directories for libraries and binary files
if(MSVC OR CMAKE_GENERATOR STREQUAL "Xcode")
if(MSVC)
# omicron
set(OMICRON_LIB_DEBUG ${OMICRON_LIB_DIR_DEBUG}/omicron.lib)
set(OMICRON_LIB_RELEASE ${OMICRON_LIB_DIR_RELEASE}/omicron.lib)
else()
if(APPLE)
set(OMICRON_LIB_DEBUG ${OMICRON_BIN_DIR}/libomicron.dylib)
set(OMICRON_LIB_RELEASE ${OMICRON_BIN_DIR}/libomicron.dylib)
if(CMAKE_GENERATOR STREQUAL "Xcode")
set(OMICRON_LIB_DEBUG ${OMICRON_BIN_DIR}/debug/libomicron.dylib)
set(OMICRON_LIB_RELEASE ${OMICRON_BIN_DIR}/release/libomicron.dylib)
else(CMAKE_GENERATOR STREQUAL "Xcode")
set(OMICRON_LIB_DEBUG ${OMICRON_BIN_DIR}/libomicron.dylib)
set(OMICRON_LIB_RELEASE ${OMICRON_BIN_DIR}/libomicron.dylib)
endif(CMAKE_GENERATOR STREQUAL "Xcode")
else(APPLE)
set(OMICRON_LIB_DEBUG ${OMICRON_BIN_DIR}/libomicron.so)
set(OMICRON_LIB_RELEASE ${OMICRON_BIN_DIR}/libomicron.so)
Expand Down
13 changes: 10 additions & 3 deletions external/equalizer.10.10.patch
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,20 @@ diff -Naur Equalizer-1.0.2/CMake/Equalizer.spec equalizer/CMake/Equalizer.spec
diff -Naur Equalizer-1.0.2/CMakeLists.txt equalizer/CMakeLists.txt
--- Equalizer-1.0.2/CMakeLists.txt 2013-04-01 15:38:52.000000000 -0500
+++ equalizer/CMakeLists.txt 2014-03-13 17:29:21.000000000 -0500
@@ -137,17 +137,17 @@
@@ -137,17 +137,24 @@
if(X11_FOUND)
if(APPLE)
set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ") # Disabled by GNU.cmake!?
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.6" )
- if(EXISTS /Developer/SDKs/MacOSX10.6.sdk)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.6 -stdlib=libstdc++" )
+ if(CMAKE_GENERATOR STREQUAL "Xcode")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++" CACHE STRING "" FORCE)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -stdlib=libstdc++" CACHE STRING "" FORCE)
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libstdc++" CACHE STRING "" FORCE)
+ SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -stdlib=libstdc++" CACHE STRING "" FORCE)
+ SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -stdlib=libstdc++" CACHE STRING "" FORCE)
+ endif(CMAKE_GENERATOR STREQUAL "Xcode")
+ if(EXISTS /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk)
if(EQUALIZER_PREFER_AGL)
set(EQ_AGL_USED 1)
Expand All @@ -42,7 +49,7 @@ diff -Naur Equalizer-1.0.2/CMakeLists.txt equalizer/CMakeLists.txt
else(APPLE)
set(EQ_GLX_USED 1)
endif(APPLE)
@@ -191,7 +191,7 @@
@@ -191,7 +198,7 @@
if(_CMAKE_OSX_MACHINE MATCHES "ppc")
set(CMAKE_OSX_ARCHITECTURES "ppc")
else()
Expand All @@ -51,7 +58,7 @@ diff -Naur Equalizer-1.0.2/CMakeLists.txt equalizer/CMakeLists.txt
endif()
endif()
set(CUDA_64_BIT_DEVICE_CODE OFF)
@@ -219,7 +219,7 @@
@@ -219,7 +226,7 @@
set(EQ_DEFINITIONS -DEQ_BUILD_DIR="${CMAKE_BINARY_DIR}/" -DEQ_SOURCE_DIR="${CMAKE_SOURCE_DIR}/")
if(EQUALIZER_RELEASE)
set(EQ_DEFINITIONS ${EQ_DEFINITIONS} -DEQ_RELEASE)
Expand Down
15 changes: 13 additions & 2 deletions include/omega/ApplicationBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,23 @@ namespace omega
// Some useful properties parsed from the command line or settable by
// an application before calling omain

//!! Application interactive mode
enum InteractiveMode
{
//!! Use the interactive mode specified in the configuration filesyn s
FromConfig,
//!! Force interactive mode
Interactive,
//! Force non-interactive mode
NonInteractive
};

//! Runs the program in interactive mode, even if the script console
//! is not enabled in the system configuration
bool interactive;
InteractiveMode interactive;

public:
ApplicationBase() : interactive(false) {}
ApplicationBase() : interactive(FromConfig) {}

virtual const char* getName() { return "OmegaLib"; }
virtual void setName(const String& name) = 0;
Expand Down
61 changes: 59 additions & 2 deletions include/omega/Camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace omega {
//! Implements a listener that can be attached to cameras to listen to draw
//! methods. All user method implementations must be reentrant, since they
//! can be called from mulitple threads.
class ICameraListener
class OMEGA_API ICameraListener
{
public:
virtual void endDraw(Camera* cam, DrawContext& context) {}
Expand All @@ -75,6 +75,7 @@ namespace omega {
{
DrawScene = 1 << 1,
DrawOverlay = 1 << 2,
CullingEnabled = 1 << 3,
DefaultFlags = DrawScene | DrawOverlay
};

Expand Down Expand Up @@ -122,6 +123,14 @@ namespace omega {
//! this camera. Set to true by default.
void setOverlayEnabled(bool value);
bool isOverlayEnabled();
//! When set to false, disables all culling for this camera.
//! All drawables will attempt drawing, even the ones that
//! are outside of this camera frustum.
//! This is useful to force drawing of all objects when we want to
//! use vertex shaders with custom projections.
//! By default, culling is enabled.
void setCullingEnabled(bool value);
bool isCullingEnabled();
//@}

//! Navigation management
Expand All @@ -144,6 +153,10 @@ namespace omega {
//! render. If it's enabled it will still be checked agains the active
//! draw context.
void setEnabled(bool value);
//! Returns true if the frame is enabled, false otherwise
//! @remarks even if the camera is enabled, this method can return
//! false if on-demand frame drawing is on and the camera is not
//! currently scheduled to draw a frame
bool isEnabled();

//! Observer control
Expand Down Expand Up @@ -209,6 +222,20 @@ namespace omega {
bool isClearDepthEnabled() { return myClearDepth; }
//@}

//! On-demand drawing
//@{
//! Queues one frame for drawing. Use this to force a frame
//! draw when MaxFps is set to 0.
void queueFrameDraw();
//! Set the maximum fps that this camera will render at.
//! Use 0 to stop camera drawing and use queueFrameDraw to
//! draw frames on-demand.
//! Use -1 to disable the fps cap and let this camera draw
//! at the maximum renderer speed (typically 60fps)
void setMaxFps(float fps);
float getMaxFps();
//@}

//! DEPRECATED
//@{
Vector3f localToWorldPosition(const Vector3f& position);
Expand Down Expand Up @@ -299,6 +326,11 @@ namespace omega {
Vector3f myCanvasPosition;
Quaternion myCanvasOrientation;
Vector3f myCanvasScale;

// On-demand drawing
bool myDrawNextFrame;
float myMaxFps;
float myTimeSinceLastFrame;
};

///////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -373,7 +405,7 @@ namespace omega {

///////////////////////////////////////////////////////////////////////////
inline bool Camera::isEnabled()
{ return myEnabled; }
{ return myEnabled && (myDrawNextFrame || myMaxFps < 0); }

///////////////////////////////////////////////////////////////////////////
inline void Camera::setSceneEnabled(bool value)
Expand All @@ -391,6 +423,18 @@ namespace omega {
inline bool Camera::isOverlayEnabled()
{ return myFlags & DrawOverlay; }

///////////////////////////////////////////////////////////////////////////
inline void Camera::setCullingEnabled(bool value)
{
if(value) myFlags |= CullingEnabled; else myFlags &= ~CullingEnabled;
}

///////////////////////////////////////////////////////////////////////////
inline bool Camera::isCullingEnabled()
{
return myFlags & CullingEnabled;
}

///////////////////////////////////////////////////////////////////////////
inline const Vector3f& Camera::getCanvasPosition() const
{ return myCanvasPosition; }
Expand All @@ -403,6 +447,19 @@ namespace omega {
inline const Vector3f& Camera::getCanvasScale() const
{ return myCanvasScale; }

///////////////////////////////////////////////////////////////////////////
inline void Camera::queueFrameDraw()
{ myDrawNextFrame = true; }

///////////////////////////////////////////////////////////////////////////
inline void Camera::setMaxFps(float fps)
{ myMaxFps = fps; }

///////////////////////////////////////////////////////////////////////////
inline float Camera::getMaxFps()
{ return myMaxFps; }


}; // namespace omega

#endif
3 changes: 2 additions & 1 deletion include/omega/DisplayTileConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* University of Illinois at Chicago
* Authors:
* Alessandro Febretti febret@gmail.com
* Koosha Mirhosseini koosha.mirhosseini@gmail.com
*-----------------------------------------------------------------------------
* Copyright (c) 2010-2015, Electronic Visualization Laboratory,
* University of Illinois at Chicago
Expand Down Expand Up @@ -63,7 +64,7 @@ namespace omega
class OMEGA_API DisplayTileConfig: public ReferenceType
{
public:
enum StereoMode { Mono, LineInterleaved, ColumnInterleaved, PixelInterleaved, SideBySide, Default };
enum StereoMode { Mono, LineInterleaved, ColumnInterleaved, PixelInterleaved, SideBySide, Quad, Default };

DisplayTileConfig(DisplayConfig& dc) :
displayConfig(dc),
Expand Down
5 changes: 5 additions & 0 deletions include/omega/DrawContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* University of Illinois at Chicago
* Authors:
* Alessandro Febretti febret@gmail.com
* Koosha Mirhosseini koosha.mirhosseini@gmail.com
*-----------------------------------------------------------------------------
* Copyright (c) 2010-2015, Electronic Visualization Laboratory,
* University of Illinois at Chicago
Expand Down Expand Up @@ -110,7 +111,10 @@ namespace omega
//! viewport, active eye and stereo settings.
void updateViewport();
void setupInterleaver();
void setupStereo();
void initializeStencilInterleaver();
void initializeQuad();

DisplayTileConfig::StereoMode getCurrentStereoMode();


Expand All @@ -127,6 +131,7 @@ namespace omega
//! sure OS windows and frame buffers have been updated before a stencil
//! mask update.
short stencilInitialized;
short quadInitialized;
int stencilMaskWidth;
int stencilMaskHeight;

Expand Down
Loading

0 comments on commit 87325c9

Please sign in to comment.