loop (HLSL)

Note

This HLSL attribute is available only when developing for the Xbox 360.

Gives preference to flow control constructs.

Syntax

[loop]

Parameters

None.

Scope

Applies to for, while, and do-while statements.

Examples

The following HLSL code snippet shows how to apply the loop attribute.

float value = 0;

[loop]
for( uint i = 0;i < 4; i++ )
{
  value ++;
}
    

See Also

Concepts

HLSL Attributes (Xbox 360)
Attribute Syntax
Attribute Categories

Reference

HLSL Attributes Reference (Xbox 360)