All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
glslTransformFeedbackComputeContext.h
Go to the documentation of this file.
1 //
2 // Copyright 2013 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 
25 #ifndef OSD_GLSL_TRANSFORM_FEEDBACK_COMPUTE_CONTEXT_H
26 #define OSD_GLSL_TRANSFORM_FEEDBACK_COMPUTE_CONTEXT_H
27 
28 #include "../version.h"
29 
30 #include "../osd/nonCopyable.h"
31 #include "../osd/opengl.h"
32 
33 #include <vector>
34 
35 namespace OpenSubdiv {
36 namespace OPENSUBDIV_VERSION {
37 
38 namespace Far{ class StencilTables; }
39 
40 namespace Osd {
41 
52 public:
61  static GLSLTransformFeedbackComputeContext * Create(Far::StencilTables const * vertexStencilTables,
62  Far::StencilTables const * varyingStencilTables=0);
63 
66 
68  bool HasVertexStencilTables() const;
69 
71  bool HasVaryingStencilTables() const;
72 
74  int GetNumControlVertices() const {
75  return _numControlVertices;
76  }
77 
79  GLuint GetVertexStencilTablesSizes() const;
80 
82  GLuint GetVertexStencilTablesOffsets() const;
83 
85  GLuint GetVertexStencilTablesIndices() const;
86 
88  GLuint GetVertexStencilTablesWeights() const;
89 
90 
92  GLuint GetVaryingStencilTablesSizes() const;
93 
95  GLuint GetVaryingStencilTablesOffsets() const;
96 
98  GLuint GetVaryingStencilTablesIndices() const;
99 
101  GLuint GetVaryingStencilTablesWeights() const;
102 
103 
104 protected:
105 
106  explicit GLSLTransformFeedbackComputeContext(Far::StencilTables const * vertexStencilTables,
107  Far::StencilTables const * varyingStencilTables);
108 
109 private:
110 
111  class GLStencilTables;
112 
113  GLStencilTables * _vertexStencilTables,
114  * _varyingStencilTables;
115 
116  int _numControlVertices;
117 };
118 
119 } // end namespace Osd
120 
121 } // end namespace OPENSUBDIV_VERSION
122 using namespace OPENSUBDIV_VERSION;
123 
124 } // end namespace OpenSubdiv
125 
126 #endif // OSD_GLSL_TRANSFORM_FEEDBACK_COMPUTE_CONTEXT_H
127 
GLuint GetVertexStencilTablesSizes() const
Returns the GL texture buffer containing vertex-stencil stencil sizes.
GLuint GetVaryingStencilTablesSizes() const
Returns the GL texture buffer containing Varying-stencil stencil sizes.
GLuint GetVaryingStencilTablesWeights() const
Returns the GL texture buffer containing Varying-stencil stencil weights.
GLuint GetVertexStencilTablesIndices() const
Returns the GL texture buffer containing vertex-stencil stencil indices.
GLuint GetVertexStencilTablesOffsets() const
Returns the GL texture buffer containing vertex-stencil stencil offsets.
bool HasVertexStencilTables() const
Returns true if the Context has a &#39;vertex&#39; interpolation stencil table.
static GLSLTransformFeedbackComputeContext * Create(Far::StencilTables const *vertexStencilTables, Far::StencilTables const *varyingStencilTables=0)
bool HasVaryingStencilTables() const
Returns true if the Context has a &#39;varying&#39; interpolation stencil table.
GLuint GetVertexStencilTablesWeights() const
Returns the GL texture buffer containing vertex-stencil stencil weights.
GLSLTransformFeedbackComputeContext(Far::StencilTables const *vertexStencilTables, Far::StencilTables const *varyingStencilTables)
GLuint GetVaryingStencilTablesOffsets() const
Returns the GL texture buffer containing Varying-stencil stencil offsets.
GLuint GetVaryingStencilTablesIndices() const
Returns the GL texture buffer containing Varying-stencil stencil indices.