Main Page
Namespaces
Classes
Files
File List
File Members
include
Graphics
GL4
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
10
#include <
LowLevel/GteThreadSafeMap.h
>
11
#include <
Graphics/GteGEInputLayoutManager.h
>
12
#include <
Graphics/GL4/GteGL4InputLayout.h
>
13
14
namespace
gte
15
{
16
17
class
GTE_IMPEXP
GL4InputLayoutManager
:
public
GEInputLayoutManager
18
{
19
public
:
20
// Construction and destruction.
21
virtual
~
GL4InputLayoutManager
();
22
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
46
LayoutMap
mMap
;
47
};
48
49
}
gte::GL4InputLayoutManager::LayoutMap
Definition:
GteGL4InputLayoutManager.h:37
GLuint
unsigned int GLuint
Definition:
glcorearb.h:89
gte::GL4InputLayout
Definition:
GteGL4InputLayout.h:16
gte::ThreadSafeMap
Definition:
GteThreadSafeMap.h:19
gte::GL4InputLayoutManager
Definition:
GteGL4InputLayoutManager.h:17
gte::GL4InputLayoutManager::VBPPair
std::pair< VertexBuffer const *, GLuint > VBPPair
Definition:
GteGL4InputLayoutManager.h:35
gte::VertexBuffer
Definition:
GteVertexBuffer.h:18
gte::GL4InputLayoutManager::mMap
LayoutMap mMap
Definition:
GteGL4InputLayoutManager.h:46
GteGL4InputLayout.h
GteThreadSafeMap.h
gte
Definition:
GLX/GteWICFileIO.h:16
gte::GEInputLayoutManager
Definition:
GteGEInputLayoutManager.h:18
gte::Shader
Definition:
GteShader.h:33
GteGEInputLayoutManager.h
GTE_IMPEXP
#define GTE_IMPEXP
Definition:
GTEngineDEF.h:63
geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:00