25 #ifndef SCG_INTERNALS_H_ 26 #define SCG_INTERNALS_H_ 56 #if !__has_feature(cxx_auto_type) 57 #error Clang version supporting C++11 feature auto-typed variables is required. 60 #if !__has_feature(cxx_rvalue_references) 61 #error Clang version supporting C++11 feature rvalue references is required. 64 #if !__has_feature(cxx_strong_enums) 65 #error Clang version supporting C++11 feature strongly-typed enumerations is required. 68 #if !__has_feature(cxx_nullptr) 69 #error Clang version supporting C++11 feature nullptr keyword is required. 72 #if !__has_feature(cxx_range_for) 73 #error Clang version supporting C++11 feature range-based for is required. 77 #if __has_feature(cxx_lambdas) 78 #define SCG_CPP11_LAMBDA_FUNCTIONS 81 #if __has_feature(cxx_generalized_initializers) 82 #define SCG_CPP11_INITIALIZER_LISTS 90 #define SCG_GCC_VERSION (100 * __GNUC__ + __GNUC_MINOR__) 91 #if SCG_GCC_VERSION < 406 // GCC version < 4.6 92 #error GCC 4.6 or higher is required. 96 #if SCG_GCC_VERSION >= 405 // GCC version >= 4.5 97 #define SCG_CPP11_LAMBDA_FUNCTIONS 100 #if SCG_GCC_VERSION >= 406 // GCC version >= 4.6 101 #define SCG_CPP11_INITIALIZER_LISTS 109 #if _MSC_VER < 1700 // Visual C++ internal version < 17.00 110 #error Visual C++ compiler version 11.00 (Visual Studio 2012) or higher is required. 114 #if _MSC_VER >= 1600 // Visual C++ internal version >= 16.00 (Visual Studio 2010) 115 #define SCG_CPP11_LAMBDA_FUNCTIONS 118 #if _MSC_VER >= 1800 // Visual C++ internal version >= 18.00 (Visual Studio 2013) 119 #define SCG_CPP11_INITIALIZER_LISTS 125 #error Unknown compiler: only Clang, GCC, and Visual C++ are supported. 140 #define SCG_DECLARE_CLASS(TypeName) \ 142 typedef std::shared_ptr<TypeName> TypeName##SP; \ 143 typedef std::unique_ptr<TypeName> TypeName##UP; 187 #define CameraTransformation Error_scg3_CameraTransformation_is_obsolete_Use_Camera_instead 195 #define SCG_DISALLOW_COPY_AND_ASSIGN(TypeName) \ 196 TypeName(const TypeName&); \ 197 void operator=(const TypeName&); 205 #define SCG_SAVE_AND_SWITCH_PROGRAM(_program, _programOld) \ 206 GLuint _programOld; \ 207 glGetIntegerv(GL_CURRENT_PROGRAM, reinterpret_cast<GLint*>(&_programOld)); \ 208 if (_program != _programOld) { \ 209 glUseProgram(_program); \ 217 #define SCG_RESTORE_PROGRAM(_program, _programOld) \ 218 if (_program != _programOld) { \ 219 glUseProgram(_programOld); \ static const char * PROJECTION_MATRIX
static const OGLFragData FRAG_COLOR
static const OGLAttrib VERTEX
static const OGLAttrib TANGENT
static const OGLAttrib COLOR
OpenGL attribute names and locations, uniform names, etc., to be used by ShaderCore,...
Fragment data name and location.
static const char * COLOR_MATRIX
static const char * GLOBAL_AMBIENT_LIGHT
static const OGLUniformBlock MATERIAL
static void bindSamplers(GLuint program)
static const OGLSampler TEXTURE1
static const char * N_LIGHTS
static const char * TEXTURE_MATRIX
Local header file for GLEW library.
Attribute name and location.
static const char * MODEL_VIEW_MATRIX
static const OGLAttrib BINORMAL
static void bindAttribFragDataLocations(GLuint program)
static const OGLAttrib TEX_COORD_0
static void bindUniformBlocks(GLuint program)
static const OGLAttrib NORMAL
static const OGLUniformBlock LIGHT
Sampler name and texture unit.
static const OGLSampler TEXTURE0
SCG_DECLARE_CLASS(Animation)
static const char * NORMAL_MATRIX
static const int MAX_NUMBER_OF_LIGHTS
static const char * MVP_MATRIX
static const OGLAttrib TEX_COORD_1