NvShaderMappings.h File Reference
This file allows applications to use a single file to declare the uniforms in a GLSL shader AND C++ code. More...
Go to the source code of this file.
Classes | |
struct | nv::boolClass |
class to make uint look like bool to make GLSL packing rules happy More... | |
Defines | |
#define | ALIGN(a) __declspec(align(a)) |
#define | SDK_MAT4 ALIGN(16) nv::matrix4f |
#define | SDK_VEC4 ALIGN(16) nv::vec4f |
#define | SDK_VEC3 ALIGN(16) nv::vec3f |
#define | SDK_VEC2 ALIGN(8) nv::vec2f |
#define | ivec4 ALIGN(16) nv::vec4i |
#define | ivec3 ALIGN(16) nv::vec3i |
#define | ivec2 ALIGN(8) nv::vec2i |
#define | uivec4 ALIGN(16) nv::vec4ui |
#define | uivec3 ALIGN(16) nv::vec3ui |
#define | uivec2 ALIGN(8) nv::vec2ui |
#define | SDK_BOOL ALIGN(4) nv::boolClass |
#define | uint unsigned int |
Detailed Description
This file allows applications to use a single file to declare the uniforms in a GLSL shader AND C++ code.The idea is to declare the uniforms in one file that is included in both the shader code and the C++ code. This simplifies the use of Uniform Buffer Objects, and avoids having the C++ struct fall out of sync with the GLSL. Sync failures between C++ and GLSL can lead to difficult-to-track bugs
Define Documentation
#define ivec2 ALIGN(8) nv::vec2i |
vectors. vectors, 4-tuples and 3-tuples must align to 16 bytes 2-vectors must align to 8 bytes
#define ivec3 ALIGN(16) nv::vec3i |
vectors. vectors, 4-tuples and 3-tuples must align to 16 bytes 2-vectors must align to 8 bytes
#define ivec4 ALIGN(16) nv::vec4i |
vectors. vectors, 4-tuples and 3-tuples must align to 16 bytes 2-vectors must align to 8 bytes
#define SDK_BOOL ALIGN(4) nv::boolClass |
scalars. uint can be a typedef bool needs special padding / alignment
#define SDK_VEC2 ALIGN(8) nv::vec2f |
vectors. vectors, 4-tuples and 3-tuples must align to 16 bytes 2-vectors must align to 8 bytes
#define SDK_VEC3 ALIGN(16) nv::vec3f |
vectors. vectors, 4-tuples and 3-tuples must align to 16 bytes 2-vectors must align to 8 bytes
#define SDK_VEC4 ALIGN(16) nv::vec4f |
vectors. vectors, 4-tuples and 3-tuples must align to 16 bytes 2-vectors must align to 8 bytes
#define uint unsigned int |
scalars. uint can be a typedef bool needs special padding / alignment
#define uivec2 ALIGN(8) nv::vec2ui |
vectors. vectors, 4-tuples and 3-tuples must align to 16 bytes 2-vectors must align to 8 bytes
#define uivec3 ALIGN(16) nv::vec3ui |
vectors. vectors, 4-tuples and 3-tuples must align to 16 bytes 2-vectors must align to 8 bytes
#define uivec4 ALIGN(16) nv::vec4ui |
vectors. vectors, 4-tuples and 3-tuples must align to 16 bytes 2-vectors must align to 8 bytes