Viewport

Viewport
Scaleform::Render::Viewport
Declaration
class Viewport;
Description

Base class for 2D graphics rendering, used through subclasses Render::D3D9, Render::GL, etc. 

Note that viewport requires BufferWidth and BufferHeight values to be provided in addition to the actual viewport rectangle. These values are necessary because they cannot be obtained consistently under all APIs. For render target textures, buffer size is the original render texture size. For a window, buffer should be the size of the client area. 

 

HAL Viewport. 

Note that Scale and AspectRatio variables have been removed from HAL viewport. These variables should be applied as a part of Flash scaling by ViewMatrix which can be a part of RootNode and converts Flash coordinate system into the pixel-based one used by HAL.

Data Members
Data Member 
Description 
The height of the buffer surface within which a viewport is located. 
The width of the buffer surface within which a viewport is located. 
View flags describing how viewport and its target buffer are used, such as View_IsRenderTexture and View_AlphaComposite. 
Height of the viewport rectangle in pixels. 
Left 
The left side of the viewport rectangle, counting in pixels from the left. 
The height of the scissor rectangle in pixels. 
The width of the scissor rectangle in pixels. 
The left side of the scissor rectangle, counting in pixels from the left. Scissor left are in the same coordinate system as Left (in buffer's ones). 
The top side of the scissor rectangle, counting in pixels from the top. Scissor top are in the same coordinate system as Top (in buffer's ones). 
Top 
The top side of the viewport rectangle, counting in pixels from the top. 
Width of the viewport rectangle in pixels. 
Methods
Method 
Description 
Viewport constructor. 
Calculates the clipped viewport rectangle. 
Obtains the rectangle that will be used for calling, in viewport-relative coordinates (floating-point). 
Determines whether the viewport is valid. 
Sets the stereo viewport (for split buffer stereo rendering). 
Viewport constructor. 
Initializes a scissor rectangle. 
Scales a bound rectangle into viewport space. 
Helper function to scale a normalized clip-space X value to viewport coordinates. 
Helper function to scale a normalized clip-space Y value to viewport coordinates. 
Topics
Topic 
Description 
Describes the flags set in Viewport. 
File

Render_Viewport.h