Main Page
Namespaces
Classes
Files
File List
File Members
include
Graphics
DX11
GteHLSLConstantBuffer.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.1 (2016/09/12)
7
8
#pragma once
9
10
#include <
Graphics/DX11/GteHLSLBaseBuffer.h
>
11
12
namespace
gte
13
{
14
15
class
GTE_IMPEXP
HLSLConstantBuffer
:
public
HLSLBaseBuffer
16
{
17
public
:
18
// TODO: Global constants in the HLSL file are placed as variables into
19
// an implicit constant buffer named $Global. We need to modify
20
// Variable to store number of bytes and default values (if any).
21
// 1. If the application writer must create the constant buffer and
22
// attach, how do we get the default data into the buffer?
23
// 2. Maybe $Global needs to be created implicitly, filled with
24
// default values, then application queries for it to modify. The
25
// idea of shader->Set("SomeCBuffer",cbuffer) was to allow sharing
26
// of constant buffers between shaders.
27
28
// Construction and destruction.
29
virtual
~
HLSLConstantBuffer
();
30
31
HLSLConstantBuffer
(
D3D_SHADER_INPUT_BIND_DESC
const
& desc,
32
unsigned
int
numBytes, std::vector<Member>
const
& members);
33
34
HLSLConstantBuffer
(
D3D_SHADER_INPUT_BIND_DESC
const
& desc,
35
unsigned
int
index
,
unsigned
int
numBytes,
36
std::vector<Member>
const
& members);
37
};
38
39
}
GteHLSLBaseBuffer.h
gte
Definition:
GLX/GteWICFileIO.h:16
D3D_SHADER_INPUT_BIND_DESC
#define D3D_SHADER_INPUT_BIND_DESC
Definition:
GteHLSLResource.h:43
gte::HLSLConstantBuffer
Definition:
GteHLSLConstantBuffer.h:15
index
GLuint index
Definition:
glcorearb.h:781
gte::HLSLBaseBuffer
Definition:
GteHLSLBaseBuffer.h:19
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