# NNS_G2dBeginRenderingEx

## Syntax

      #include <nnsys/g2d/g2d_Renderer.h>

          void NNS_G2dBeginRenderingEx
          (
              NNSG2dRendererInstance* pRendererInstance,
              u32                     opzHint
          );

## Arguments

`pRendererInstance` | [IN] Renderer entity
`opzHint` | [IN] Optimization hint

## Return Values

None.

## Description

Performs configurations (preprocessing) before rendering with the renderer.
Call this function before calling the renderer rendering method. Do not call this function inside the `BeginRendering` — `EndRendering` block. It is possible to designate a hint flag for rendering optimization with this function.
The hint is created with the logical OR of the `NNSG2dRendererOptimizeHint` enumerator.
The definition of `NNSG2dRendererOptimizeHint` is as follows.
``

    typedef enum NNSG2dRendererOptimizeHint
    {
        NNS_G2D_RDR_OPZHINT_NONE              = 0x0,
        NNS_G2D_RDR_OPZHINT_NOT_SR            = 0x1,  // Do not use SR (Scale Rotate) conversion
        NNS_G2D_RDR_OPZHINT_LOCK_PARAMS       = 0x2   //  Lock the parameter

    }NNSG2dRendererOptimizeHint;

`NNS_G2D_RDR_OPZHINT_NOT_SR` indicates that SR (Scale Rotate) conversion is not used.
`NNS_G2D_RDR_OPZHINT_LOCK_PARAMS` indicates that each parameter is locked.
Specifically, the image proxy and the surface type are not alterable inside the renderer `BeginRendering` — `EndRendering` block.
If there are multiple surfaces that are each registered, the surfaces must be switched inside the render function. Therefore, this option cannot be designated for the renderer. If this option is designated in such a case, execution fails in the assert.
The optimization hint flag is reset via the `NNS_G2dEndRendering` function.
In other words, the optimization hint flag is valid only inside the `BeginRendering` — `EndRendering` block of the renderer.
After performing the optimization preprocessing, this function calls the normal `NNS_G2dBeginRendering` function.

## See Also

`NNS_G2dBeginRendering`
`NNS_G2dEndRendering`

## Revision History

2004/11/10 Initial version.

CONFIDENTIAL