NVidia Gameworks
  • Main Page
  • Classes
  • Files
  • File List
  • File Members

NvShaderMappings.h

Go to the documentation of this file.
00001 // TAGRELEASE: PUBLIC
00002 
00003 #ifndef NV_SHADER_MAPPINGS_H
00004 #define NV_SHADER_MAPPINGS_H
00005 
00012 
00013 #if defined(ANDROID) || defined(LINUX)
00014 #define ALIGN(a)__attribute__ ((aligned (a)))
00015 #else
00016 #define ALIGN(a) __declspec(align(a))
00017 #endif
00018 
00019 namespace nv {
00020 // Matrices, must align to 4 vector (16 bytes)
00021 #define SDK_MAT4 ALIGN(16) nv::matrix4f
00022 
00027 #define SDK_VEC4 ALIGN(16) nv::vec4f
00028 #define SDK_VEC3 ALIGN(16) nv::vec3f
00029 #define SDK_VEC2 ALIGN(8) nv::vec2f
00030 
00031 #define ivec4 ALIGN(16) nv::vec4i
00032 #define ivec3 ALIGN(16) nv::vec3i
00033 #define ivec2 ALIGN(8) nv::vec2i
00034 
00035 #define uivec4 ALIGN(16) nv::vec4ui
00036 #define uivec3 ALIGN(16) nv::vec3ui
00037 #define uivec2 ALIGN(8) nv::vec2ui
00039 
00044 #define SDK_BOOL ALIGN(4) nv::boolClass
00045 #define uint unsigned int
00047 
00049 struct boolClass
00050 {
00051         unsigned int _rep;
00052 
00053         boolClass() : _rep(false) {}
00054         boolClass( bool b) : _rep(b) {}
00055         operator bool() { return _rep == 0 ? false : true; }
00056         boolClass& operator=( bool b) { _rep = b; return *this; }
00057 };
00058 
00059 };
00060 
00061 #endif
Generated on Sat Mar 8 14:58:35 2014 for NVIDIA GameWorks OpenGL App Framework and Libraries by Doxygen
©2014 NVIDIA Corporation.