GteGLSLVisualProgram.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 
12 
13 // TODO: Move GLSLReflection out of the class. The reflection work should
14 // be done in GLSLProgramFactory, GTEngine-required data packaged in the
15 // factory, and this graphics-API-independent data passed to the Shader
16 // constructors. HLSL factory creation should do the same so that Shader
17 // does not know about graphics API. We also don't want VisualProgram-derived
18 // classes storing so much information that is not used.
19 
20 namespace gte
21 {
22 
24 {
25 public:
26  // Construction and destruction.
27  virtual ~GLSLVisualProgram();
28  GLSLVisualProgram(GLuint programHandle, GLuint vshaderHandle,
29  GLuint pshaderHandle, GLuint gshaderHandle);
30 
31  // Member access. GLEngine needs the program handle for enabling and
32  // disabling the program. TODO: Do we need the Get*ShaderHandle
33  // functions?
34  inline GLuint GetProgramHandle() const;
35  inline GLuint GetVShaderHandle() const;
36  inline GLuint GetPShaderHandle() const;
37  inline GLuint GetGShaderHandle() const;
38  inline GLSLReflection const& GetReflector() const;
39 
40 private:
41  GLuint mProgramHandle, mVShaderHandle, mPShaderHandle, mGShaderHandle;
43 };
44 
46 {
47  return mProgramHandle;
48 }
49 
51 {
52  return mVShaderHandle;
53 }
54 
56 {
57  return mPShaderHandle;
58 }
59 
61 {
62  return mGShaderHandle;
63 }
64 
66 {
67  return mReflector;
68 }
69 
70 }
unsigned int GLuint
Definition: glcorearb.h:89
GLuint GetVShaderHandle() const
GLSLReflection const & GetReflector() const
GLuint GetProgramHandle() const
GLuint GetGShaderHandle() const
GLuint GetPShaderHandle() const
#define GTE_IMPEXP
Definition: GTEngineDEF.h:63


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