View and Scissor d3d API

namespace d3d

Functions

bool setscissor(int x, int y, int w, int h)

Set scissor for the current render target. Part of the render target that is outside the scissor rectangle is not rendered.

Parameters:
  • x – - left corner of the scissor rectangle

  • y – - top corner of the scissor rectangle

  • w – - width of the scissor rectangle

  • h – - height of the scissor rectangle

Returns:

true if the scissor rectangle was set successfully

bool setscissors(dag::ConstSpan<ScissorRect> scissorRects)

Set scissor for the current set of render targets. Part of the render target that is outside the scissor rectangle is not rendered.

Parameters:

scissorRects – - array of scissor rectangles. Should be the same size as the number of render targets.

Returns:

true if the scissor rectangles were set successfully

bool setview(int x, int y, int w, int h, float minz, float maxz)

Set view for the current render target. Part of the render target that is outside the view rectangle is not rendered.

Parameters:
  • x – - left corner of the view rectangle

  • y – - top corner of the view rectangle

  • w – - width of the view rectangle

  • h – - height of the view rectangle

  • minz – - minimum depth value of the view rectangle

  • maxz – - maximum depth value of the view rectangle

Returns:

true if the view rectangle was set successfully

bool setviews(dag::ConstSpan<Viewport> viewports)

Set view for the current set of render targets. Part of the render target that is outside the view rectangle is not rendered.

Parameters:

viewports – - array of view rectangles. Should be the same size as the number of render targets.

Returns:

true if the view rectangles were set successfully

bool getview(int &x, int &y, int &w, int &h, float &minz, float &maxz)

Get view for the current render target.

Deprecated:

Don’t use it since this method relies on the global state.

Parameters:
  • x – - left corner of the view rectangle

  • y – - top corner of the view rectangle

  • w – - width of the view rectangle

  • h – - height of the view rectangle

  • minz – - minimum depth value of the view rectangle

  • maxz – - maximum depth value of the view rectangle

Returns:

true if the view rectangle was retrieved successfully