27 #include "gpuCommand.h" 34 NotifyCategoryDef(gpucommand,
"");
45 _command_type = command_type;
47 memset(_data, 0x0,
sizeof(
float) * GPU_COMMAND_ENTRIES);
61 out <<
"GPUCommand(type=" << _command_type <<
", size=" << _current_index <<
", data = {" << std::endl;
62 for (
size_t k = 0; k < GPU_COMMAND_ENTRIES; ++k) {
63 out << std::setw(12) << std::fixed << std::setprecision(5) << _data[k] <<
" ";
64 if (k % 6 == 5 || k == GPU_COMMAND_ENTRIES - 1) out << std::endl;
66 out <<
"})" << std::endl;
84 size_t command_size = GPU_COMMAND_ENTRIES *
sizeof(float);
85 size_t offset = command_index * command_size;
86 memcpy(dest.p() + offset, &_data, command_size);
void write_to(const PTA_uchar &dest, size_t command_index)
Writes the GPU command to a given target.
CommandType
The different types of GPUCommands.
GPUCommand(CommandType command_type)
Constructs a new GPUCommand with the given command type.
void write(std::ostream &out) const
Prints out the GPUCommand to the console.
void push_int(int v)
RenderPipeline.