GtePointLightTextureEffect.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 
11 #include <Graphics/GteTexture2.h>
12 
13 namespace gte
14 {
15 
17 {
18 public:
19  // Construction.
20  PointLightTextureEffect(std::shared_ptr<ProgramFactory> const& factory,
21  BufferUpdater const& updater, std::shared_ptr<Material> const& material,
22  std::shared_ptr<Lighting> const& lighting, std::shared_ptr<LightCameraGeometry> const& geometry,
23  std::shared_ptr<Texture2> const& texture, SamplerState::Filter filter,
24  SamplerState::Mode mode0, SamplerState::Mode mode1);
25 
26  // Member access.
27  inline std::shared_ptr<Texture2> const& GetTexture() const;
28  inline std::shared_ptr<SamplerState> const& GetSampler() const;
29 
30  // After you set or modify 'material', 'light', or 'geometry', call the update
31  // to inform any listener that the corresponding constant buffer has changed.
32  virtual void UpdateMaterialConstant();
33  virtual void UpdateLightingConstant();
34  virtual void UpdateGeometryConstant();
35 
36 private:
38  {
43  };
44 
46  {
51  };
52 
54  {
57  };
58 
59  std::shared_ptr<Texture2> mTexture;
60  std::shared_ptr<SamplerState> mSampler;
61 
62  // Shader source code as strings.
65  static std::string const msHLSLSource;
66  static std::string const* msVSSource[ProgramFactory::PF_NUM_API];
67  static std::string const* msPSSource[ProgramFactory::PF_NUM_API];
68 };
69 
70 inline std::shared_ptr<Texture2> const& PointLightTextureEffect::GetTexture() const
71 {
72  return mTexture;
73 }
74 
75 inline std::shared_ptr<SamplerState> const& PointLightTextureEffect::GetSampler() const
76 {
77  return mSampler;
78 }
79 
80 }
std::function< void(std::shared_ptr< Buffer > const &)> BufferUpdater
Definition: GteBuffer.h:24
GLsizei const GLchar *const * string
Definition: glcorearb.h:809
std::shared_ptr< SamplerState > mSampler
static std::string const msGLSLVSSource
GLuint texture
Definition: glcorearb.h:410
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glcorearb.h:1292
std::shared_ptr< SamplerState > const & GetSampler() const
std::shared_ptr< Texture2 > mTexture
static std::string const msGLSLPSSource
static std::string const msHLSLSource
#define GTE_IMPEXP
Definition: GTEngineDEF.h:63
std::shared_ptr< Texture2 > const & GetTexture() const


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