Skip to content

Commit

Permalink
Updated Appleseed to 1.2.0-beta.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhaddon committed Jul 23, 2015
1 parent f9a8f3a commit 7e5d065
Show file tree
Hide file tree
Showing 2,565 changed files with 2,801 additions and 558 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ option (USE_STATIC_BOOST "Use static Boost libraries"
option (USE_STATIC_OIIO "Use static OpenImageIO libraries" ON)
option (USE_STATIC_OSL "Use static OpenShadingLanguage libraries" ON)

option (USE_SSE "Use SSE and SSE 2 instruction sets" ON)
option (USE_SSE "Use SSE instruction sets up to version 2" ON)
option (USE_SSE42 "Use SSE instruction sets up to version 4.2" OFF)

option (HIDE_SYMBOLS "When using gcc, hide symbols not on the public API" ON)

Expand Down Expand Up @@ -134,8 +135,8 @@ endif ()
#--------------------------------------------------------------------------------------------------

set (appleseed_version_major 1)
set (appleseed_version_minor 1)
set (appleseed_version_patch 2)
set (appleseed_version_minor 2)
set (appleseed_version_patch 0)
set (appleseed_version_maturity beta)

configure_file (${PROJECT_SOURCE_DIR}/src/appleseed/foundation/core/version.h.in
Expand All @@ -157,7 +158,12 @@ if (USE_STATIC_BOOST)
set (Boost_USE_STATIC_LIBS TRUE)
endif ()

set (BOOST_NEEDED_LIBS chrono date_time filesystem regex system thread wave)
set (BOOST_NEEDED_LIBS chrono date_time filesystem regex system thread)

if (WITH_OSL)
set (BOOST_NEEDED_LIBS ${BOOST_NEEDED_LIBS} wave)
endif ()

find_package (Boost 1.47 REQUIRED ${BOOST_NEEDED_LIBS})

add_definitions (-DBOOST_FILESYSTEM_VERSION=3 -DBOOST_FILESYSTEM_NO_DEPRECATED)
Expand Down Expand Up @@ -329,15 +335,26 @@ if (is_x86)
APPLESEED_X86
)
endif ()

# SSE.
if (USE_SSE42)
set (USE_SSE TRUE)
endif ()
if (USE_SSE)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SIZEOF_VOID_P MATCHES 4)
message (WARNING "Building appleseed with SSE/SSE2 instruction sets on 32-bit Linux is not supported; continuing without SSE/SSE2.")
else ()
set (preprocessor_definitions_common
${preprocessor_definitions_common}
APPLESEED_USE_SSE
)
endif ()
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SIZEOF_VOID_P MATCHES 4)
message (WARNING "Building appleseed with SSE/SSE2 instruction sets on 32-bit Linux is not supported; continuing without SSE/SSE2.")
else ()
set (preprocessor_definitions_common
${preprocessor_definitions_common}
APPLESEED_USE_SSE
)
if (USE_SSE42)
set (preprocessor_definitions_common
${preprocessor_definitions_common}
APPLESEED_USE_SSE42
)
endif ()
endif ()
endif ()

# Debug configuration.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ Developer and contributor documentation can be found in the [wiki](https://githu
##### Fetch, a very short film

[![Fetch](https://raw.github.com/appleseedhq/appleseed-wiki/master/images/fetch.png)](https://vimeo.com/appleseedhq/fetchaveryshortfilm)

### Demos

##### Interactive lookdev inside appleseed.studio

[![Interactive lookdev inside appleseed.studio](https://i.vimeocdn.com/video/518464756_1280.jpg)](https://vimeo.com/127622613)
File renamed without changes.
151 changes: 151 additions & 0 deletions appleseed-1.2.0-beta/sandbox/samples/cpp/basic/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@

#
# This source file is part of appleseed.
# Visit http://appleseedhq.net/ for additional information and resources.
#
# This software is released under the MIT license.
#
# Copyright (c) 2013 Nicholas Yue, Jupiter Jazz Limited
# Copyright (c) 2014-2015 Nicholas Yue, The appleseedhq Organization
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#


#--------------------------------------------------------------------------------------------------
# CMake configuration.
#--------------------------------------------------------------------------------------------------

cmake_minimum_required (VERSION 2.8 FATAL_ERROR)

project (basic)

set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../../../share/cmake/Modules;${PROJECT_SOURCE_DIR}/../../../../src/cmake/Modules)


#--------------------------------------------------------------------------------------------------
# Build options.
#--------------------------------------------------------------------------------------------------

option (USE_EXTERNAL_OIIO "Use external OpenImageIO library" OFF)
option (USE_EXTERNAL_OSL "Use external OpenShadingLanguage library" OFF)

option (WITH_OSL "Build OSL support" OFF)

option (USE_STATIC_BOOST "Use static Boost libraries" ON)
option (USE_STATIC_OIIO "Use static OpenImageIO libraries" ON)
option (USE_STATIC_OSL "Use static OpenShadingLanguage libraries" ON)


#--------------------------------------------------------------------------------------------------
# Boost libraries.
#--------------------------------------------------------------------------------------------------

set (Boost_MULTITHREADED TRUE)

if (USE_STATIC_BOOST)
set (Boost_USE_STATIC_LIBS TRUE)
endif ()

find_package (Boost 1.47 REQUIRED ${BOOST_NEEDED_LIBS})

add_definitions (-DBOOST_FILESYSTEM_VERSION=3 -DBOOST_FILESYSTEM_NO_DEPRECATED)

include_directories (${Boost_INCLUDE_DIRS})
link_directories (${Boost_LIBRARY_DIRS})


#--------------------------------------------------------------------------------------------------
# Find external packages.
#--------------------------------------------------------------------------------------------------

find_package (Appleseed)
find_package (Imath)
find_package (OpenEXR)

if (WITH_OSL)
set (WITH_OIIO TRUE)
endif ()

if (WITH_OIIO)
add_definitions (-DAPPLESEED_WITH_OIIO)
if (USE_STATIC_OIIO)
add_definitions (-DOIIO_STATIC_BUILD)
endif ()
if (USE_EXTERNAL_OIIO)
find_package (OpenImageIO REQUIRED)
endif ()
endif ()

if (WITH_OSL)
add_definitions (-DAPPLESEED_WITH_OSL)
if (USE_STATIC_OSL)
add_definitions (-DOSL_STATIC_LIBRARY)
endif ()
if (USE_EXTERNAL_OSL)
find_package (OSL REQUIRED)
endif ()
endif ()


#--------------------------------------------------------------------------------------------------
# Include paths.
#--------------------------------------------------------------------------------------------------

include_directories (${APPLESEED_INCLUDE_DIRS})
include_directories (${IMATH_INCLUDE_DIRS})
include_directories (${OPENEXR_INCLUDE_DIRS})

if (WITH_OIIO)
if (USE_EXTERNAL_OIIO)
include_directories (${OPENIMAGEIO_INCLUDE_DIRS})
else ()
include_directories (${APPLESEED_DEPS_STAGE_DIR}/oiio-debug/include)
endif ()
endif ()

if (WITH_OSL)
if (USE_EXTERNAL_OSL)
include_directories (${OSL_INCLUDE_DIRS})
else ()
include_directories (${APPLESEED_DEPS_STAGE_DIR}/osl-debug/include)
endif ()
endif ()


#--------------------------------------------------------------------------------------------------
# Preprocessor definitions.
#--------------------------------------------------------------------------------------------------

if (MSVC)
add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
endif ()


#--------------------------------------------------------------------------------------------------
# Product.
#--------------------------------------------------------------------------------------------------

add_executable (basic basic.cpp)

target_link_libraries (basic
${APPLESEED_LIBRARIES}
${IMATH_LIBRARIES}
${OPENEXR_LIBRARIES}
)
Original file line number Diff line number Diff line change
Expand Up @@ -294,19 +294,23 @@ int main()

// Create the master renderer.
asr::DefaultRendererController renderer_controller;
asr::MasterRenderer renderer(
project.ref(),
project->configurations().get_by_name("final")->get_inherited_parameters(),
&renderer_controller);
std::auto_ptr<asr::MasterRenderer> renderer(
new asr::MasterRenderer(
project.ref(),
project->configurations().get_by_name("final")->get_inherited_parameters(),
&renderer_controller));

// Render the frame.
renderer.render();
renderer->render();

// Save the frame to disk.
project->get_frame()->write_main_image("output/test.png");

// Save the project to disk.
asr::ProjectFileWriter::write(project.ref(), "output/test.appleseed");

// Make sure to delete the master renderer before the project and the logger / log target.
renderer.reset();

return 0;
}
Loading

0 comments on commit 7e5d065

Please sign in to comment.