Panda3D
Public Member Functions | Public Attributes | List of all members
GPUCommandList Class Reference

Class to store a list of commands. More...

Public Member Functions

 __init__ ()
 Constructs a new GPUCommandList. More...
 
 __init__ (const GPUCommandList)
 
 addCommand (const GPUCommand cmd)
 Pushes a GPUCommand to the command list. More...
 
int getNumCommands ()
 Returns the number of commands in this list. More...
 
int writeCommandsTo (const PTAUchar dest, int limit)
 Writes the first n-commands to a destination. More...
 

Public Attributes

int num_commands
 Returns the number of commands in this list. More...
 

Detailed Description

Class to store a list of commands.

This is a class to store a list of GPUCommands. It provides functionality to only provide the a given amount of commands at one time.

Member Function Documentation

◆ __init__() [1/2]

__init__ ( )

Constructs a new GPUCommandList.

This constructs a new GPUCommandList. By default, there are no commands in the list.

◆ __init__() [2/2]

__init__ ( const  GPUCommandList)

◆ addCommand()

addCommand ( const GPUCommand  cmd)

Pushes a GPUCommand to the command list.

This adds a new GPUCommand to the list of commands to be processed.

Parameters
cmdThe command to add

◆ getNumCommands()

int getNumCommands ( )

Returns the number of commands in this list.

This returns the amount of commands which are currently stored in this list, and are waiting to get processed.

Returns
Amount of commands

◆ writeCommandsTo()

int writeCommandsTo ( const PTAUchar  dest,
int  limit 
)

Writes the first n-commands to a destination.

This takes the first #limit commands, and writes them to the destination using GPUCommand::write_to. See GPUCommand::write_to for further information about #dest. The limit controls after how much commands the processing will be stopped. All commands which got processed will get removed from the list.

Parameters
destDestination to write to, see GPUCommand::write_to
limitMaximum amount of commands to process
Returns
Amount of commands processed, between 0 and #limit.

Member Data Documentation

◆ num_commands

int num_commands

Returns the number of commands in this list.

This returns the amount of commands which are currently stored in this list, and are waiting to get processed.

Returns
Amount of commands