GteTextEffect.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.0 (2016/06/19)
7 
8 #pragma once
9 
10 #include <Mathematics/GteVector4.h>
14 #include <Graphics/GteTexture2.h>
16 
17 namespace gte
18 {
19 
21 {
22 public:
23  // Construction.
24  TextEffect(std::shared_ptr<ProgramFactory> const& factory,
25  std::shared_ptr<Texture2> const& texture);
26 
27  // Support for typesetting.
28  std::shared_ptr<ConstantBuffer> const& GetTranslate() const;
29  std::shared_ptr<ConstantBuffer> const& GetColor() const;
30  void SetTranslate(float x, float y);
31  void SetColor(Vector4<float> const& color);
32 
33 private:
34  std::shared_ptr<ConstantBuffer> mTranslate;
35  std::shared_ptr<ConstantBuffer> mColor;
36  std::shared_ptr<SamplerState> mSamplerState;
37 
38  // Shader source code as strings.
41  static std::string const msHLSLSource;
42  static std::string const* msVSSource[ProgramFactory::PF_NUM_API];
43  static std::string const* msPSSource[ProgramFactory::PF_NUM_API];
44 };
45 
46 }
GLuint color
Definition: glcorearb.h:1256
static std::string const msHLSLSource
Definition: GteTextEffect.h:41
static std::string const msGLSLVSSource
Definition: GteTextEffect.h:39
std::shared_ptr< ConstantBuffer > mTranslate
Definition: GteTextEffect.h:34
GLint GLenum GLint x
Definition: glcorearb.h:404
GLsizei const GLchar *const * string
Definition: glcorearb.h:809
GLuint texture
Definition: glcorearb.h:410
std::shared_ptr< ConstantBuffer > mColor
Definition: GteTextEffect.h:35
std::shared_ptr< SamplerState > mSamplerState
Definition: GteTextEffect.h:36
static std::string const msGLSLPSSource
Definition: GteTextEffect.h:40
GLint y
Definition: glcorearb.h:98
#define GTE_IMPEXP
Definition: GTEngineDEF.h:63


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