nngxAdd3DCommand Function

Syntax

NNGX_APICALL void NNGX_APIENTRY nngxAdd3DCommand(
     GLvoid * bufferaddr,
     GLsizei buffersize,
     GLboolean copycmd
);

Arguments

Name Description
in bufferaddr Pointer to the data region where the 3D commands to add are located.
in buffersize Size (in bytes) of the 3D commands to add.
in copycmd Addition method (specifies whether to add a 3D command buffer or a render command request).

Return Values

There is no return value.

Description

Adds the data (3D commands) in the specified region to the current 3D command buffer.

If copycmd is GL_TRUE, the data in the region specified by bufferaddr is copied to the current 3D command buffer. Set buffersize equal to the number of bytes to copy. Behavior is not guaranteed if a 3D command buffer with split commands is copied.

If copycmd is GL_FALSE, a render command request is first generated with the region specified by bufferaddr as its execution address and then added to the current command requests. Set buffersize equal to the number of bytes in the 3D command buffer to execute. If unsplit 3D commands have accumulated in the current 3D command buffer, this function calls the nngxSplitDrawCmdlist function and then adds the newly generated render command request. Behavior is not guaranteed if the last command in the specified region is not a split command.

This function flushes the cache for the region specified by bufferaddr when copycmd is GL_FALSE. When a cache flush is unnecessary, it can be omitted by using the nngxAdd3DCommandNoCacheFlush function.

This function generates the following errors.

GL_ERROR_804E_DMPNo command list is currently bound.
GL_ERROR_804F_DMPEither buffersize is 0 or it is not a multiple of 16 (or not a multiple of 4 if copycmd is GL_TRUE).
GL_ERROR_8050_DMPThe copycmd argument is GL_TRUE and the size of the current 3D command buffer is insufficient.
GL_ERROR_8051_DMPThe copycmd argument is GL_FALSE and the size of the current command requests is insufficient.
GL_ERROR_8052_DMPThe copycmd argument is GL_FALSE and the value specified for bufferaddr is not a multiple of 16.

See Also

nngxAdd3DCommandNoCacheFlush

Revision History

2011/03/18
Added an explanation about the nngxAdd3DCommandNoCacheFlush function.
2010/08/12
Revised because of changed buffersize restrictions (see GL_ERROR_804F_DMP).
2010/05/07
Added information on buffersize restrictions.
2010/03/12
Initial version.

CONFIDENTIAL