GteGL4InputLayoutManager.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 
13 
14 namespace gte
15 {
16 
18 {
19 public:
20  // Construction and destruction.
21  virtual ~GL4InputLayoutManager();
23 
24  // Management functions. The Unbind(vbuffer) removes all layouts that
25  // involve vbuffer. The Unbind(vshader) is stubbed out because GL4 does
26  // not require it, but we wish to have Unbind(GraphicsObject const*) as
27  // a base-class GraphicsEngine function.
28  GL4InputLayout* Bind(GLuint programHandle, GLuint vbufferHandle, VertexBuffer const* vbuffer);
29  virtual bool Unbind(VertexBuffer const* vbuffer) override;
30  virtual bool Unbind(Shader const* vshader) override;
31  virtual void UnbindAll() override;
32  virtual bool HasElements() const override;
33 
34 private:
35  typedef std::pair<VertexBuffer const*, GLuint> VBPPair;
36 
37  class LayoutMap : public ThreadSafeMap<VBPPair, std::shared_ptr<GL4InputLayout>>
38  {
39  public:
40  virtual ~LayoutMap();
41  LayoutMap();
42 
43  void GatherMatch(VertexBuffer const* vbuffer, std::vector<VBPPair>& matches);
44  };
45 
47 };
48 
49 }
unsigned int GLuint
Definition: glcorearb.h:89
std::pair< VertexBuffer const *, GLuint > VBPPair
#define GTE_IMPEXP
Definition: GTEngineDEF.h:63


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