GteHLSLShaderVariable.h
Go to the documentation of this file.
1 // David Eberly, Geometric Tools, Redmond WA 98052
2 // Copyright (c) 1998-2017
3 // Distributed under the Boost Software License, Version 1.0.
4 // http://www.boost.org/LICENSE_1_0.txt
5 // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
6 // File Version: 3.0.1 (2016/09/12)
7 
8 #pragma once
9 
11 #include <fstream>
12 #include <vector>
13 
14 namespace gte
15 {
17 {
18 public:
19  struct Description
20  {
22  unsigned int offset;
23  unsigned int numBytes;
24  unsigned int flags;
25  unsigned int textureStart;
26  unsigned int textureNumSlots;
27  unsigned int samplerStart;
28  unsigned int samplerNumSlots;
29  std::vector<unsigned char> defaultValue;
30  };
31 
32  // Construction. Shader variables are reported for constant buffers,
33  // texture buffers, and structs defined in the shaders (resource
34  // binding information).
36 
37  // Deferred construction for shader reflection. This function is
38  // intended to be write-once.
39  void SetDescription(D3D_SHADER_VARIABLE_DESC const& desc);
40 
41  // Member access.
42  std::string const& GetName() const;
43  unsigned int GetOffset() const;
44  unsigned int GetNumBytes() const;
45  unsigned int GetFlags() const;
46  unsigned int GetTextureStart() const;
47  unsigned int GetTextureNumSlots() const;
48  unsigned int GetSamplerStart() const;
49  unsigned int GetSamplerNumSlots() const;
50  std::vector<unsigned char> const& GetDefaultValue() const;
51 
52  // Print to a text file for human readability.
53  void Print(std::ofstream& output) const;
54 
55 private:
57 };
58 
59 }
#define D3D_SHADER_VARIABLE_DESC
GLsizei const GLchar *const * string
Definition: glcorearb.h:809
std::vector< unsigned char > defaultValue
#define GTE_IMPEXP
Definition: GTEngineDEF.h:63


geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:00