2
Copyright (c) 2009-2010 Sony Pictures Imageworks Inc., et al.
5
Redistribution and use in source and binary forms, with or without
6
modification, are permitted provided that the following conditions are
8
* Redistributions of source code must retain the above copyright
9
notice, this list of conditions and the following disclaimer.
10
* Redistributions in binary form must reproduce the above copyright
11
notice, this list of conditions and the following disclaimer in the
12
documentation and/or other materials provided with the distribution.
13
* Neither the name of Sony Pictures Imageworks nor the names of its
14
contributors may be used to endorse or promote products derived from
15
this software without specific prior written permission.
16
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
/////////////////////////////////////////////////////////////////////////
34
/// Various compile-time defaults are defined here that could, in
35
/// principle, be redefined if you are using OSL in some particular
36
/// renderer that wanted things a different way.
37
/////////////////////////////////////////////////////////////////////////
39
// Test if we are using C++11
40
#if (__cplusplus >= 201103L)
41
#define OSL_USING_CPLUSPLUS11 1
44
// Symbol export defines
47
// All the things we need from Imath
48
#include <OpenEXR/ImathVec.h>
49
#include <OpenEXR/ImathColor.h>
50
#include <OpenEXR/ImathMatrix.h>
52
// All the things we need from OpenImageIO
53
#include <OpenImageIO/version.h>
54
#include <OpenImageIO/errorhandler.h>
55
#include <OpenImageIO/texture.h>
56
#include <OpenImageIO/typedesc.h>
57
#include <OpenImageIO/ustring.h>
59
// Sort out smart pointers
60
#ifdef OSL_USING_CPLUSPLUS11
63
# include <boost/shared_ptr.hpp>
66
// Extensions to Imath
69
#include "oslversion.h"
74
/// By default, we operate with single precision float. Change this
75
/// definition to make a shading system that fundamentally operates
77
/// FIXME: it's very likely that all sorts of other things will break
78
/// if you do this, but eventually we should make sure it works.
81
/// By default, use the excellent Imath vector, matrix, and color types
82
/// from the IlmBase package from: http://www.openexr.com
84
/// It's permissible to override these types with the vector, matrix,
85
/// and color classes of your choice, provided that (a) your vectors
86
/// have the same data layout as a simple Float[n]; (b) your
87
/// matrices have the same data layout as Float[n][n]; and (c) your
88
/// classes have most of the obvious constructors and overloaded
89
/// operators one would expect from a C++ vector/matrix/color class.
90
typedef Imath::Vec3<Float> Vec3;
91
typedef Imath::Matrix33<Float> Matrix33;
92
typedef Imath::Matrix44<Float> Matrix44;
93
typedef Imath::Color3<Float> Color3;
94
typedef Imath::Vec2<Float> Vec2;
96
typedef Imathx::Matrix22<Float> Matrix22;
98
/// Assume that we are dealing with OpenImageIO's texture system. It
99
/// doesn't literally have to be OIIO's... it just needs to have the
100
/// same API as OIIO's TextureSystem class, it's a purely abstract class
102
using OIIO::TextureSystem;
103
using OIIO::TextureOpt;
105
// And some other things we borrow from OIIO...
106
using OIIO::ErrorHandler;
107
using OIIO::TypeDesc;
109
using OIIO::ustringHash;
111
// Sort out smart pointers
112
#ifdef OSL_USING_CPLUSPLUS11
113
using std::shared_ptr;
115
using boost::shared_ptr;
121
#endif /* OSLCONFIG_H */
2
Copyright (c) 2009-2010 Sony Pictures Imageworks Inc., et al.
5
Redistribution and use in source and binary forms, with or without
6
modification, are permitted provided that the following conditions are
8
* Redistributions of source code must retain the above copyright
9
notice, this list of conditions and the following disclaimer.
10
* Redistributions in binary form must reproduce the above copyright
11
notice, this list of conditions and the following disclaimer in the
12
documentation and/or other materials provided with the distribution.
13
* Neither the name of Sony Pictures Imageworks nor the names of its
14
contributors may be used to endorse or promote products derived from
15
this software without specific prior written permission.
16
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
/////////////////////////////////////////////////////////////////////////
34
/// Various compile-time defaults are defined here that could, in
35
/// principle, be redefined if you are using OSL in some particular
36
/// renderer that wanted things a different way.
37
/////////////////////////////////////////////////////////////////////////
39
// Test if we are using C++11
40
#if (__cplusplus >= 201103L)
41
#define OSL_USING_CPLUSPLUS11 1
44
// Symbol export defines
47
// All the things we need from Imath
48
#include <OpenEXR/ImathVec.h>
49
#include <OpenEXR/ImathColor.h>
50
#include <OpenEXR/ImathMatrix.h>
52
// All the things we need from OpenImageIO
53
#include <OpenImageIO/version.h>
54
#include <OpenImageIO/errorhandler.h>
55
#include <OpenImageIO/texture.h>
56
#include <OpenImageIO/typedesc.h>
57
#include <OpenImageIO/ustring.h>
59
// Sort out smart pointers
60
#ifdef OSL_USING_CPLUSPLUS11
63
# include <boost/shared_ptr.hpp>
66
// Extensions to Imath
69
#include "oslversion.h"
74
/// By default, we operate with single precision float. Change this
75
/// definition to make a shading system that fundamentally operates
77
/// FIXME: it's very likely that all sorts of other things will break
78
/// if you do this, but eventually we should make sure it works.
81
/// By default, use the excellent Imath vector, matrix, and color types
82
/// from the IlmBase package from: http://www.openexr.com
84
/// It's permissible to override these types with the vector, matrix,
85
/// and color classes of your choice, provided that (a) your vectors
86
/// have the same data layout as a simple Float[n]; (b) your
87
/// matrices have the same data layout as Float[n][n]; and (c) your
88
/// classes have most of the obvious constructors and overloaded
89
/// operators one would expect from a C++ vector/matrix/color class.
90
typedef Imath::Vec3<Float> Vec3;
91
typedef Imath::Matrix33<Float> Matrix33;
92
typedef Imath::Matrix44<Float> Matrix44;
93
typedef Imath::Color3<Float> Color3;
94
typedef Imath::Vec2<Float> Vec2;
96
typedef Imathx::Matrix22<Float> Matrix22;
98
/// Assume that we are dealing with OpenImageIO's texture system. It
99
/// doesn't literally have to be OIIO's... it just needs to have the
100
/// same API as OIIO's TextureSystem class, it's a purely abstract class
102
using OIIO::TextureSystem;
103
using OIIO::TextureOpt;
105
// And some other things we borrow from OIIO...
106
using OIIO::ErrorHandler;
107
using OIIO::TypeDesc;
109
using OIIO::ustringHash;
111
// Sort out smart pointers
112
#ifdef OSL_USING_CPLUSPLUS11
113
using std::shared_ptr;
115
using boost::shared_ptr;
121
#endif /* OSLCONFIG_H */