Public Member Functions | Private Attributes | Static Private Attributes | List of all members
gte::TextEffect Class Reference

#include <GteTextEffect.h>

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

Public Member Functions

std::shared_ptr< ConstantBuffer > const & GetColor () const
 
std::shared_ptr< ConstantBuffer > const & GetTranslate () const
 
void SetColor (Vector4< float > const &color)
 
void SetTranslate (float x, float y)
 
 TextEffect (std::shared_ptr< ProgramFactory > const &factory, std::shared_ptr< Texture2 > const &texture)
 
- Public Member Functions inherited from gte::VisualEffect
std::shared_ptr< GeometryShader > const & GetGeometryShader () const
 
std::shared_ptr< PixelShader > const & GetPixelShader () const
 
std::shared_ptr< VisualProgram > const & GetProgram () const
 
std::shared_ptr< VertexShader > const & GetVertexShader () const
 
 VisualEffect (std::shared_ptr< VisualProgram > const &program)
 
virtual ~VisualEffect ()
 

Private Attributes

std::shared_ptr< ConstantBuffermColor
 
std::shared_ptr< SamplerStatemSamplerState
 
std::shared_ptr< ConstantBuffermTranslate
 

Static Private Attributes

static std::string const msGLSLPSSource
 
static std::string const msGLSLVSSource
 
static std::string const msHLSLSource
 
static std::string const * msPSSource [ProgramFactory::PF_NUM_API]
 
static std::string const * msVSSource [ProgramFactory::PF_NUM_API]
 

Additional Inherited Members

- Protected Member Functions inherited from gte::VisualEffect
 VisualEffect ()
 
- Protected Attributes inherited from gte::VisualEffect
BufferUpdater mBufferUpdater
 
std::shared_ptr< VisualProgrammProgram
 
TextureArrayUpdater mTextureArrayUpdater
 
TextureUpdater mTextureUpdater
 

Detailed Description

Definition at line 20 of file GteTextEffect.h.

Constructor & Destructor Documentation

TextEffect::TextEffect ( std::shared_ptr< ProgramFactory > const &  factory,
std::shared_ptr< Texture2 > const &  texture 
)

Definition at line 13 of file GteTextEffect.cpp.

Member Function Documentation

std::shared_ptr< ConstantBuffer > const & TextEffect::GetColor ( ) const

Definition at line 43 of file GteTextEffect.cpp.

std::shared_ptr< ConstantBuffer > const & TextEffect::GetTranslate ( ) const

Definition at line 38 of file GteTextEffect.cpp.

void TextEffect::SetColor ( Vector4< float > const &  color)

Definition at line 55 of file GteTextEffect.cpp.

void TextEffect::SetTranslate ( float  x,
float  y 
)

Definition at line 48 of file GteTextEffect.cpp.

Member Data Documentation

std::shared_ptr<ConstantBuffer> gte::TextEffect::mColor
private

Definition at line 35 of file GteTextEffect.h.

std::shared_ptr<SamplerState> gte::TextEffect::mSamplerState
private

Definition at line 36 of file GteTextEffect.h.

std::string const TextEffect::msGLSLPSSource
staticprivate
Initial value:
=
"uniform TextColor\n"
"{\n"
" vec4 textColor;\n"
"};\n"
"\n"
"layout(location = 0) in vec2 vertexTCoord;\n"
"layout(location = 0) out vec4 pixelColor;\n"
"\n"
"uniform sampler2D baseSampler;\n"
"\n"
"void main()\n"
"{\n"
" float bitmapAlpha = texture(baseSampler, vertexTCoord).r;\n"
" if (bitmapAlpha > 0.5f)\n"
" {\n"
" discard;\n"
" }\n"
" pixelColor = textColor;\n"
"}\n"

Definition at line 40 of file GteTextEffect.h.

std::string const TextEffect::msGLSLVSSource
staticprivate
Initial value:
=
"uniform Translate\n"
"{\n"
" vec2 translate;\n"
"};\n"
"\n"
"layout(location = 0) in vec2 modelPosition;\n"
"layout(location = 1) in vec2 modelTCoord;\n"
"layout(location = 0) out vec2 vertexTCoord;\n"
"\n"
"void main()\n"
"{\n"
" vertexTCoord = modelTCoord;\n"
" gl_Position.x = 2.0f * modelPosition.x - 1.0f + 2.0f * translate.x;\n"
" gl_Position.y = 2.0f * modelPosition.y - 1.0f + 2.0f * translate.y;\n"
" gl_Position.z = -1.0f;\n"
" gl_Position.w = 1.0f;\n"
"}\n"

Definition at line 39 of file GteTextEffect.h.

std::string const TextEffect::msHLSLSource
staticprivate

Definition at line 41 of file GteTextEffect.h.

std::string const * TextEffect::msPSSource
staticprivate
Initial value:

Definition at line 43 of file GteTextEffect.h.

std::string const * TextEffect::msVSSource
staticprivate
Initial value:

Definition at line 42 of file GteTextEffect.h.

std::shared_ptr<ConstantBuffer> gte::TextEffect::mTranslate
private

Definition at line 34 of file GteTextEffect.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