Panda3D
contrib
src
rplight
gpuCommandList.h
1
/**
2
*
3
* RenderPipeline
4
*
5
* Copyright (c) 2014-2016 tobspr <tobias.springer1@gmail.com>
6
*
7
* Permission is hereby granted, free of charge, to any person obtaining a copy
8
* of this software and associated documentation files (the "Software"), to deal
9
* in the Software without restriction, including without limitation the rights
10
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
* copies of the Software, and to permit persons to whom the Software is
12
* furnished to do so, subject to the following conditions:
13
*
14
* The above copyright notice and this permission notice shall be included in
15
* all copies or substantial portions of the Software.
16
*
17
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
* THE SOFTWARE.
24
*
25
*/
26
27
#ifndef GPUCOMMANDLIST_H
28
#define GPUCOMMANDLIST_H
29
30
#include "
pandabase.h
"
31
#include "gpuCommand.h"
32
33
#include <queue>
34
35
/**
36
* @brief Class to store a list of commands.
37
* @details This is a class to store a list of GPUCommands. It provides
38
* functionality to only provide the a given amount of commands at one time.
39
*/
40
class
GPUCommandList
{
41
PUBLISHED:
42
GPUCommandList
();
43
44
void
add_command
(
const
GPUCommand
& cmd);
45
size_t
get_num_commands
();
46
size_t
write_commands_to
(
const
PTA_uchar &dest,
size_t
limit = 32);
47
48
MAKE_PROPERTY(num_commands,
get_num_commands
);
49
50
protected
:
51
std::queue<GPUCommand> _commands;
52
};
53
54
#endif // GPUCOMMANDLIST_H
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
GPUCommandList::get_num_commands
get_num_commands
Returns the number of commands in this list.
Definition:
gpuCommandList.h:48
GPUCommandList::write_commands_to
size_t write_commands_to(const PTA_uchar &dest, size_t limit=32)
Writes the first n-commands to a destination.
Definition:
gpuCommandList.cxx:71
GPUCommandList::GPUCommandList
GPUCommandList()
RenderPipeline.
Definition:
gpuCommandList.cxx:35
GPUCommand
Class for storing data to be transferred to the GPU.
Definition:
gpuCommand.h:47
GPUCommandList::add_command
void add_command(const GPUCommand &cmd)
Pushes a GPUCommand to the command list.
Definition:
gpuCommandList.cxx:44
GPUCommandList
RenderPipeline.
Definition:
gpuCommandList.h:40
Generated on Mon Sep 14 2020 15:06:41 for Panda3D by
1.8.20