Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
gte::Shader Class Reference

#include <GteShader.h>

Inheritance diagram for gte::Shader:
Inheritance graph
[legend]

Classes

struct  Data
 

Public Types

enum  {
  ConstantBufferShaderDataLookup = 0, TextureBufferShaderDataLookup = 1, StructuredBufferShaderDataLookup = 2, RawBufferShaderDataLookup = 3,
  TextureSingleShaderDataLookup = 4, TextureArrayShaderDataLookup = 5, SamplerStateShaderDataLookup = 6, NUM_LOOKUP_INDICES = 7
}
 

Public Member Functions

int Get (std::string const &name) const
 
template<typename T >
std::shared_ptr< T > const Get (std::string const &name) const
 
template<typename T >
std::shared_ptr< T > const Get (int handle) const
 
std::vector< unsigned char > const & GetCompiledCode () const
 
bool GetConstantBufferLayout (int handle, BufferLayout &layout) const
 
bool GetConstantBufferLayout (std::string const &name, BufferLayout &layout) const
 
unsigned int GetConstantBufferSize (int handle) const
 
unsigned int GetConstantBufferSize (std::string const &name) const
 
std::vector< Data > const & GetData (int lookup) const
 
unsigned int GetNumXThreads () const
 
unsigned int GetNumYThreads () const
 
unsigned int GetNumZThreads () const
 
unsigned int GetStructuredBufferSize (int handle) const
 
unsigned int GetStructuredBufferSize (std::string const &name) const
 
bool GetTextureBufferLayout (int handle, BufferLayout &layout) const
 
bool GetTextureBufferLayout (std::string const &name, BufferLayout &layout) const
 
unsigned int GetTextureBufferSize (int handle) const
 
unsigned int GetTextureBufferSize (std::string const &name) const
 
template<typename T >
int Set (std::string const &name, std::shared_ptr< T > const &object)
 
template<typename T >
void Set (int handle, std::shared_ptr< T > const &object)
 
template<>
int Set (std::string const &name, std::shared_ptr< ConstantBuffer > const &object)
 
template<>
int Set (std::string const &name, std::shared_ptr< TextureBuffer > const &object)
 
template<>
void Set (int handle, std::shared_ptr< ConstantBuffer > const &object)
 
template<>
void Set (int handle, std::shared_ptr< TextureBuffer > const &object)
 
 Shader (HLSLShader const &program)
 
- Public Member Functions inherited from gte::GraphicsObject
std::string const & GetName () const
 
GraphicsObjectType GetType () const
 
bool IsBuffer () const
 
bool IsDrawingState () const
 
bool IsShader () const
 
bool IsTexture () const
 
bool IsTextureArray () const
 
void SetName (std::string const &name)
 
virtual ~GraphicsObject ()
 

Protected Member Functions

bool IsValid (Data const &goal, ConstantBuffer *resource) const
 
bool IsValid (Data const &goal, TextureBuffer *resource) const
 
bool IsValid (Data const &goal, StructuredBuffer *resource) const
 
bool IsValid (Data const &goal, RawBuffer *resource) const
 
bool IsValid (Data const &goal, TextureSingle *resource) const
 
bool IsValid (Data const &goal, TextureArray *resource) const
 
bool IsValid (Data const &goal, SamplerState *state) const
 
- Protected Member Functions inherited from gte::GraphicsObject
 GraphicsObject ()
 

Protected Attributes

std::vector< unsigned char > mCompiledCode
 
std::vector< DatamData [NUM_LOOKUP_INDICES]
 
unsigned int mNumXThreads
 
unsigned int mNumYThreads
 
unsigned int mNumZThreads
 
- Protected Attributes inherited from gte::GraphicsObject
std::string mName
 
GraphicsObjectType mType
 

Private Attributes

std::vector< BufferLayoutmCBufferLayouts
 
std::vector< BufferLayoutmTBufferLayouts
 

Additional Inherited Members

- Static Public Member Functions inherited from gte::GraphicsObject
static void SubscribeForDestruction (std::shared_ptr< ListenerForDestruction > const &listener)
 
static void UnsubscribeForDestruction (std::shared_ptr< ListenerForDestruction > const &listener)
 

Detailed Description

Definition at line 33 of file GteShader.h.

Member Enumeration Documentation

anonymous enum
Enumerator
ConstantBufferShaderDataLookup 
TextureBufferShaderDataLookup 
StructuredBufferShaderDataLookup 
RawBufferShaderDataLookup 
TextureSingleShaderDataLookup 
TextureArrayShaderDataLookup 
SamplerStateShaderDataLookup 
NUM_LOOKUP_INDICES 

Definition at line 108 of file GteShader.h.

Constructor & Destructor Documentation

Shader::Shader ( HLSLShader const &  program)

Definition at line 362 of file GteShader.cpp.

Member Function Documentation

int Shader::Get ( std::string const &  name) const

Definition at line 456 of file GteShader.cpp.

template<typename T >
std::shared_ptr< T > const gte::Shader::Get ( std::string const &  name) const

Definition at line 241 of file GteShader.h.

template<typename T >
std::shared_ptr< T > const gte::Shader::Get ( int  handle) const

Definition at line 271 of file GteShader.h.

std::vector< unsigned char > const & gte::Shader::GetCompiledCode ( ) const
inline

Definition at line 388 of file GteShader.h.

bool Shader::GetConstantBufferLayout ( int  handle,
BufferLayout layout 
) const

Definition at line 557 of file GteShader.cpp.

bool Shader::GetConstantBufferLayout ( std::string const &  name,
BufferLayout layout 
) const

Definition at line 570 of file GteShader.cpp.

unsigned int Shader::GetConstantBufferSize ( int  handle) const

Definition at line 473 of file GteShader.cpp.

unsigned int Shader::GetConstantBufferSize ( std::string const &  name) const

Definition at line 485 of file GteShader.cpp.

std::vector< Shader::Data > const & gte::Shader::GetData ( int  lookup) const
inline

Definition at line 393 of file GteShader.h.

unsigned int gte::Shader::GetNumXThreads ( ) const
inline

Definition at line 373 of file GteShader.h.

unsigned int gte::Shader::GetNumYThreads ( ) const
inline

Definition at line 378 of file GteShader.h.

unsigned int gte::Shader::GetNumZThreads ( ) const
inline

Definition at line 383 of file GteShader.h.

unsigned int Shader::GetStructuredBufferSize ( int  handle) const

Definition at line 529 of file GteShader.cpp.

unsigned int Shader::GetStructuredBufferSize ( std::string const &  name) const

Definition at line 541 of file GteShader.cpp.

bool Shader::GetTextureBufferLayout ( int  handle,
BufferLayout layout 
) const

Definition at line 587 of file GteShader.cpp.

bool Shader::GetTextureBufferLayout ( std::string const &  name,
BufferLayout layout 
) const

Definition at line 600 of file GteShader.cpp.

unsigned int Shader::GetTextureBufferSize ( int  handle) const

Definition at line 501 of file GteShader.cpp.

unsigned int Shader::GetTextureBufferSize ( std::string const &  name) const

Definition at line 513 of file GteShader.cpp.

bool Shader::IsValid ( Data const &  goal,
ConstantBuffer resource 
) const
protected

Definition at line 649 of file GteShader.cpp.

bool Shader::IsValid ( Data const &  goal,
TextureBuffer resource 
) const
protected

Definition at line 672 of file GteShader.cpp.

bool Shader::IsValid ( Data const &  goal,
StructuredBuffer resource 
) const
protected

Definition at line 695 of file GteShader.cpp.

bool Shader::IsValid ( Data const &  goal,
RawBuffer resource 
) const
protected

Definition at line 748 of file GteShader.cpp.

bool Shader::IsValid ( Data const &  goal,
TextureSingle resource 
) const
protected

Definition at line 771 of file GteShader.cpp.

bool Shader::IsValid ( Data const &  goal,
TextureArray resource 
) const
protected

Definition at line 808 of file GteShader.cpp.

bool Shader::IsValid ( Data const &  goal,
SamplerState state 
) const
protected

Definition at line 845 of file GteShader.cpp.

template<typename T >
int gte::Shader::Set ( std::string const &  name,
std::shared_ptr< T > const &  object 
)

Definition at line 219 of file GteShader.h.

template<typename T >
void gte::Shader::Set ( int  handle,
std::shared_ptr< T > const &  object 
)

Definition at line 254 of file GteShader.h.

template<>
int gte::Shader::Set ( std::string const &  name,
std::shared_ptr< ConstantBuffer > const &  object 
)
inline

Definition at line 284 of file GteShader.h.

template<>
int gte::Shader::Set ( std::string const &  name,
std::shared_ptr< TextureBuffer > const &  object 
)
inline

Definition at line 310 of file GteShader.h.

template<>
void gte::Shader::Set ( int  handle,
std::shared_ptr< ConstantBuffer > const &  object 
)
inline

Definition at line 336 of file GteShader.h.

template<>
void gte::Shader::Set ( int  handle,
std::shared_ptr< TextureBuffer > const &  object 
)
inline

Definition at line 356 of file GteShader.h.

Member Data Documentation

std::vector<BufferLayout> gte::Shader::mCBufferLayouts
private

Definition at line 205 of file GteShader.h.

std::vector<unsigned char> gte::Shader::mCompiledCode
protected

Definition at line 199 of file GteShader.h.

std::vector<Data> gte::Shader::mData[NUM_LOOKUP_INDICES]
protected

Definition at line 198 of file GteShader.h.

unsigned int gte::Shader::mNumXThreads
protected

Definition at line 200 of file GteShader.h.

unsigned int gte::Shader::mNumYThreads
protected

Definition at line 201 of file GteShader.h.

unsigned int gte::Shader::mNumZThreads
protected

Definition at line 202 of file GteShader.h.

std::vector<BufferLayout> gte::Shader::mTBufferLayouts
private

Definition at line 206 of file GteShader.h.


The documentation for this class was generated from the following files:


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