GraphicsContext Class Reference

Class representing the graphics context. More...

List of all members.

Public Member Functions

 GraphicsContext ()
 Creates the graphics context.
 GraphicsContext (int width, int height, PixelFormat colorFormat, PixelFormat depthFormat, MultiSampleMode multiSampleMode)
 Creates the graphics context (with screen parameters)
void Dispose ()
 Frees unmanaged resources of the graphics context.
void SwapBuffers ()
 Updates the screen.
void Clear ()
 Clears the frame buffer.
void Clear (ClearMask mask)
 Clears the frame buffer (with mask)
void DrawArrays (DrawMode mode, int first, int count)
 Renders the primitive.
void DrawArrays (DrawMode mode, int first, int count, int repeat)
 Renders the primitive (for multiple primitives)
void DrawArrays (Primitive[] primitives)
 Renders the primitive (for a primitive array)
void DrawArrays (Primitive[] primitives, int first, int count)
 Renders the primitive (for primitive array, with specified range)
void DrawArraysInstanced (DrawMode mode, int first, int count, int instFirst, int instCount)
 Renders the primitive (for instance rendering)
void ReadPixels (byte[] pixels, PixelFormat format, int sx, int sy, int sw, int sh)
 Reads the pixels of the frame buffer.
void ReadPixels (Texture2D texture, int level, int dx, int dy, int sx, int sy, int sw, int sh)
 Reads frame buffer pixels (copies to a 2D texture)
void ReadPixels (TextureCube texture, int level, TextureCubeFace cubeFace, int dx, int dy, int sx, int sy, int sw, int sh)
 Reads frame buffer pixels (copies to a cube texture)
ShaderProgram GetShaderProgram ()
 Obtains the shader program.
void SetShaderProgram (ShaderProgram program)
 Sets a shader program.
VertexBuffer GetVertexBuffer (int index)
 Obtains the vertex buffer.
void SetVertexBuffer (int index, VertexBuffer buffer)
 Sets the vertex buffer.
Texture GetTexture (int index)
 Obtains the texture.
void SetTexture (int index, Texture texture)
 Sets the texture.
FrameBuffer GetFrameBuffer ()
 Obtains the frame buffer.
void SetFrameBuffer (FrameBuffer buffer)
 Sets the frame buffer.
EnableMode GetEnableMode ()
 Obtains the logical OR of the flag that represents whether or not each graphics feature is enabled.
void SetEnableMode (EnableMode mode)
 Sets the logical OR of the flag that represents whether or not each graphics feature is enabled.
bool IsEnabled (EnableMode mode)
 Obtains whether or not the specified graphics feature is enabled.
void Enable (EnableMode mode, bool status)
 Enables or disables the specified graphics feature.
void Enable (EnableMode mode)
 Enables the specified graphics feature.
void Disable (EnableMode mode)
 Disables the specified graphics feature.
ImageRect GetScissor ()
 Obtains the rectangle for the scissor test.
void SetScissor (ImageRect rectangle)
 Sets the rectangle for the scissor test.
void SetScissor (int x, int y, int w, int h)
 Sets the rectangle for the scissor test.
ImageRect GetViewport ()
 Obtains the rectangle of the viewport.
void SetViewport (ImageRect rectangle)
 Sets the rectangle of the viewport.
void SetViewport (int x, int y, int w, int h)
 Sets the rectangle of the viewport.
Vector2 GetDepthRange ()
 Obtains the range for the depth value.
void SetDepthRange (Vector2 range)
 Sets the range for the depth value.
void SetDepthRange (float min, float max)
 Sets the range for the depth value.
Vector4 GetClearColor ()
 Obtains the color to be used for clearing the frame buffer.
void SetClearColor (Vector4 color)
 Sets the color to be used for clearing the frame buffer.
void SetClearColor (float r, float g, float b, float a)
 Sets the color to be used for clearing the frame buffer.
void SetClearColor (int r, int g, int b, int a)
 Sets the color to be used for clearing the frame buffer.
float GetClearDepth ()
 Obtains the depth value to be used for clearing the frame buffer.
void SetClearDepth (float depth)
 Sets the depth value to be used for clearing the frame buffer.
int GetClearStencil ()
 Obtains the stencil value to be used for clearing the frame buffer.
void SetClearStencil (int stencil)
 Sets the stencil value to be used for clearing the frame buffer.
CullFace GetCullFace ()
 Obtains back-face culling.
void SetCullFace (CullFace face)
 Sets back-face culling.
void SetCullFace (CullFaceMode mode, CullFaceDirection direction)
 Sets back-face culling.
BlendFunc GetBlendFunc ()
 Obtains the alpha-blending function.
void SetBlendFunc (BlendFunc func)
 Sets the alpha-blending function.
void SetBlendFunc (BlendFuncMode mode, BlendFuncFactor srcFactor, BlendFuncFactor dstFactor)
 Sets the alpha-blending function.
BlendFunc GetBlendFuncRgb ()
 Obtains the alpha-blending function (for the RGB channel)
void SetBlendFuncRgb (BlendFunc func)
 Sets the alpha-blending function (for the RGB channel)
void SetBlendFuncRgb (BlendFuncMode mode, BlendFuncFactor srcFactor, BlendFuncFactor dstFactor)
 Sets the alpha-blending function (for the RGB channel)
BlendFunc GetBlendFuncAlpha ()
 Obtains the alpha-blending function (for the alpha channel)
void SetBlendFuncAlpha (BlendFunc func)
 Sets the alpha-blending function (for the alpha channel)
void SetBlendFuncAlpha (BlendFuncMode mode, BlendFuncFactor srcFactor, BlendFuncFactor dstFactor)
 Sets the alpha-blending function (for the alpha channel)
DepthFunc GetDepthFunc ()
 Obtains the depth test function.
void SetDepthFunc (DepthFunc func)
 Sets the depth test function.
void SetDepthFunc (DepthFuncMode mode, bool writeMask)
 Sets the depth test function.
PolygonOffset GetPolygonOffset ()
 Obtains the polygon offset.
void SetPolygonOffset (PolygonOffset offset)
 Sets the polygon offset.
void SetPolygonOffset (float factor, float units)
 Sets the polygon offset.
StencilFunc GetStencilFunc ()
 Obtains the stencil test function.
void SetStencilFunc (StencilFunc func)
 Sets the stencil test function.
void SetStencilFunc (StencilFuncMode mode, int reference, int readMask, int writeMask)
 Sets the stencil test function.
StencilOp GetStencilOp ()
 Obtains the stencil test operation.
void SetStencilOp (StencilOp op)
 Sets the stencil test operation.
void SetStencilOp (StencilOpMode fail, StencilOpMode zFail, StencilOpMode zPass)
 Sets the stencil test operation.
StencilFunc GetStencilFuncFront ()
 Obtains the stencil test function (for the front surface)
void SetStencilFuncFront (StencilFunc func)
 Sets the stencil test function (for the front surface)
void SetStencilFuncFront (StencilFuncMode mode, int reference, int readMask, int writeMask)
 Sets the stencil test function (for the front surface)
StencilOp GetStencilOpFront ()
 Obtains the stencil test operation (for the front surface)
void SetStencilOpFront (StencilOp op)
 Sets the stencil test operation (for the front surface)
void SetStencilOpFront (StencilOpMode fail, StencilOpMode zFail, StencilOpMode zPass)
 Sets the stencil test operation (for the front surface)
StencilFunc GetStencilFuncBack ()
 Obtains the stencil test function (for the back surface)
void SetStencilFuncBack (StencilFunc func)
 Sets the stencil test function (for the back surface)
void SetStencilFuncBack (StencilFuncMode mode, int reference, int readMask, int writeMask)
 Sets the stencil test function (for the back surface)
StencilOp GetStencilOpBack ()
 Obtains the stencil test operation (for the back surface)
void SetStencilOpBack (StencilOp op)
 Sets the stencil test operation (for the back surface)
void SetStencilOpBack (StencilOpMode fail, StencilOpMode zFail, StencilOpMode zPass)
 Sets the stencil test operation (for the back surface)
ColorMask GetColorMask ()
 Obtains the color write mask.
void SetColorMask (ColorMask mask)
 Sets the color write mask.
float GetLineWidth ()
 Obtains the line width.
void SetLineWidth (float width)
 Sets the line width.

Properties

static ImageSize[] ScreenSizes [get]
 Array of the screen size that can be specified upon initialization.
FrameBuffer Screen [get]
 Frame buffer representing the default screen.
GraphicsCaps Caps [get]
 Class representing the graphics capacity.

Detailed Description

Class representing the graphics context.


Constructor & Destructor Documentation

Creates the graphics context.

Creates the graphics context using standard settings. Note that multiple graphics context cannot be created.

GraphicsContext ( int  width,
int  height,
PixelFormat  colorFormat,
PixelFormat  depthFormat,
MultiSampleMode  multiSampleMode 
)

Creates the graphics context (with screen parameters)

Parameters:
widthScreen width (default if 0)
heightScreen height (default if 0)
colorFormatScreen color format (default if PixelFormat.None)
depthFormatScreen depth format (default if PixelFormat.None)
multiSampleModeScreen multisample mode (default if MultiSampleMode.None)

Creates the graphics context using the specified parameters. Rgba, Rgba4444, Rgba5551, or Rgb565 can be specified to the color format. Depth16, Depth24, Depth16Stencil8, or Depth24Stencil8 can be specified to the depth format. Note that multiple graphics context cannot be created.

When the specified screen size differs from the display resolution of the device, a virtual screen of the specified size is created and the rendered content will be scaled and displayed. The screen's aspect ratio will be maintained and a pillar box or letter box will be displayed as necessary.

The screen size is restricted to the maximum size or lower. The default value for the maximum size is 1280x800. The maximum size can be specified with PublishingUtility. Correct operation is requested of applications even when the screen size is equivalent to the maximum size.

If the specified format cannot be used by the device, a separate format close to the specified value will be used.


Member Function Documentation

void Clear ( ClearMask  mask)

Clears the frame buffer (with mask)

Parameters:
maskBuffer clear mask
void Disable ( EnableMode  mode)

Disables the specified graphics feature.

Parameters:
modeGraphics feature to enable or disable
void DrawArrays ( Primitive[]  primitives)

Renders the primitive (for a primitive array)

Parameters:
primitivesPrimitive array
void DrawArrays ( Primitive[]  primitives,
int  first,
int  count 
)

Renders the primitive (for primitive array, with specified range)

Parameters:
primitivesPrimitive array
firstStarting number for primitives
countNumber of primitives
void DrawArrays ( DrawMode  mode,
int  first,
int  count 
)

Renders the primitive.

Parameters:
modePrimitive rendering mode
firstStarting vertex of the primitive
countNumber of vertices in the primitive
void DrawArrays ( DrawMode  mode,
int  first,
int  count,
int  repeat 
)

Renders the primitive (for multiple primitives)

Parameters:
modePrimitive rendering mode
firstStarting vertex of the primitive
countNumber of vertices in the primitive
repeatNumber of primitives

Renders multiple primitives.

graphics_draw_multiple.png
void DrawArraysInstanced ( DrawMode  mode,
int  first,
int  count,
int  instFirst,
int  instCount 
)

Renders the primitive (for instance rendering)

Parameters:
modePrimitive rendering mode
firstStarting vertex of the primitive
countNumber of vertices in the primitive
instFirstStarting number of the instance
instCountNumber of instances

Renders multiple instances of one primitive. To transfer parameters of each instance, specify the instance divisor and use the created vertex buffer. If the instance divisor is 0, each vertex data will be transferred per vertex. If the instance divisor is 1, each vertex data will be transferred per instance.

graphics_draw_instanced.png
void Enable ( EnableMode  mode,
bool  status 
)

Enables or disables the specified graphics feature.

Parameters:
modeGraphics feature to enable or disable
statusSpecify true to enable
void Enable ( EnableMode  mode)

Enables the specified graphics feature.

Parameters:
modeGraphics feature to enable or disable
BlendFunc GetBlendFunc ( )

Obtains the alpha-blending function.

Returns:
Structure representing the alpha-blending function
BlendFunc GetBlendFuncAlpha ( )

Obtains the alpha-blending function (for the alpha channel)

Returns:
Structure representing the alpha-blending function
BlendFunc GetBlendFuncRgb ( )

Obtains the alpha-blending function (for the RGB channel)

Returns:
Structure representing the alpha-blending function
Vector4 GetClearColor ( )

Obtains the color to be used for clearing the frame buffer.

Returns:
Color
float GetClearDepth ( )

Obtains the depth value to be used for clearing the frame buffer.

Returns:
Depth value (0.0f-1.0f)
int GetClearStencil ( )

Obtains the stencil value to be used for clearing the frame buffer.

Returns:
Stencil value (0-255)
ColorMask GetColorMask ( )

Obtains the color write mask.

Returns:
Color write mask
CullFace GetCullFace ( )

Obtains back-face culling.

Returns:
Structure representing back-face culling
DepthFunc GetDepthFunc ( )

Obtains the depth test function.

Returns:
Structure representing the depth test function
Vector2 GetDepthRange ( )

Obtains the range for the depth value.

Returns:
Depth value range
EnableMode GetEnableMode ( )

Obtains the logical OR of the flag that represents whether or not each graphics feature is enabled.

Returns:
Logical OR of the flag that represents whether or not each graphics feature is enabled
FrameBuffer GetFrameBuffer ( )

Obtains the frame buffer.

Returns:
FrameBuffer
float GetLineWidth ( )

Obtains the line width.

Returns:
Line width
PolygonOffset GetPolygonOffset ( )

Obtains the polygon offset.

Returns:
Structure representing the polygon offset
ImageRect GetScissor ( )

Obtains the rectangle for the scissor test.

Returns:
Rectangle for the scissor test
ShaderProgram GetShaderProgram ( )

Obtains the shader program.

Returns:
Shader Program
StencilFunc GetStencilFunc ( )

Obtains the stencil test function.

Returns:
Structure representing the stencil test function
StencilFunc GetStencilFuncBack ( )

Obtains the stencil test function (for the back surface)

Returns:
Structure representing the stencil test function
StencilFunc GetStencilFuncFront ( )

Obtains the stencil test function (for the front surface)

Returns:
Structure representing the stencil test function
StencilOp GetStencilOp ( )

Obtains the stencil test operation.

Returns:
Structure representing the stencil test operation
StencilOp GetStencilOpBack ( )

Obtains the stencil test operation (for the back surface)

Returns:
Structure representing the stencil test operation
StencilOp GetStencilOpFront ( )

Obtains the stencil test operation (for the front surface)

Returns:
Structure representing the stencil test operation
Texture GetTexture ( int  index)

Obtains the texture.

Parameters:
indexTexture number (0-7)
Returns:
Textures
VertexBuffer GetVertexBuffer ( int  index)

Obtains the vertex buffer.

Parameters:
indexVertex buffer number (0-3)
Returns:
Vertex buffer
ImageRect GetViewport ( )

Obtains the rectangle of the viewport.

Returns:
Viewport rectangle
bool IsEnabled ( EnableMode  mode)

Obtains whether or not the specified graphics feature is enabled.

Parameters:
modeGraphics feature to enable or disable
Returns:
Specify true to enable
void ReadPixels ( byte[]  pixels,
PixelFormat  format,
int  sx,
int  sy,
int  sw,
int  sh 
)

Reads the pixels of the frame buffer.

Parameters:
pixelsPixel data storing destination
formatPixel format
sxX coordinate of the transfer source
syY coordinate of the transfer source
swWidth of the transfer source
shHeight of the transfer source

Copies the pixels of the frame buffer to the specified array. Rgba or the same format as the frame buffer can be specified to the pixel format.

void ReadPixels ( Texture2D  texture,
int  level,
int  dx,
int  dy,
int  sx,
int  sy,
int  sw,
int  sh 
)

Reads frame buffer pixels (copies to a 2D texture)

Parameters:
texture2D texture
levelMipmap level (0 to LevelCount-1)
dxX coordinate of the transfer destination
dyY coordinate of the transfer destination
sxX coordinate of the transfer source
syY coordinate of the transfer source
swWidth of the transfer source
shHeight of the transfer source

Copies the frame buffer pixels to the specified 2D texture. The usable texture formats are Rgba, Rgba4444, Rgba5551, and Rgb565. Note that copying cannot be performed from a frame buffer without an alpha component to a texture with an alpha component.

void ReadPixels ( TextureCube  texture,
int  level,
TextureCubeFace  cubeFace,
int  dx,
int  dy,
int  sx,
int  sy,
int  sw,
int  sh 
)

Reads frame buffer pixels (copies to a cube texture)

Parameters:
textureCube texture
levelMipmap level (0 to LevelCount-1)
cubeFaceCube surface
dxX coordinate of the transfer destination
dyY coordinate of the transfer destination
sxX coordinate of the transfer source
syY coordinate of the transfer source
swWidth of the transfer source
shHeight of the transfer source

Copies the frame buffer pixels to the specified cube texture. The usable texture formats are Rgba, Rgba4444, Rgba5551, and Rgb565. Note that copying cannot be performed from a frame buffer without an alpha component to a texture with an alpha component.

void SetBlendFunc ( BlendFunc  func)

Sets the alpha-blending function.

Parameters:
funcStructure representing the alpha-blending function
void SetBlendFunc ( BlendFuncMode  mode,
BlendFuncFactor  srcFactor,
BlendFuncFactor  dstFactor 
)

Sets the alpha-blending function.

Parameters:
modeAlpha-blending function mode
srcFactorAlpha-blending function source coefficient
dstFactorAlpha-blending function destination coefficient
void SetBlendFuncAlpha ( BlendFunc  func)

Sets the alpha-blending function (for the alpha channel)

Parameters:
funcStructure representing the alpha-blending function
void SetBlendFuncAlpha ( BlendFuncMode  mode,
BlendFuncFactor  srcFactor,
BlendFuncFactor  dstFactor 
)

Sets the alpha-blending function (for the alpha channel)

Parameters:
modeAlpha-blending function mode
srcFactorAlpha-blending function source coefficient
dstFactorAlpha-blending function destination coefficient
void SetBlendFuncRgb ( BlendFuncMode  mode,
BlendFuncFactor  srcFactor,
BlendFuncFactor  dstFactor 
)

Sets the alpha-blending function (for the RGB channel)

Parameters:
modeAlpha-blending function mode
srcFactorAlpha-blending function source coefficient
dstFactorAlpha-blending function destination coefficient
void SetBlendFuncRgb ( BlendFunc  func)

Sets the alpha-blending function (for the RGB channel)

Parameters:
funcStructure representing the alpha-blending function
void SetClearColor ( Vector4  color)

Sets the color to be used for clearing the frame buffer.

Parameters:
colorColor
void SetClearColor ( int  r,
int  g,
int  b,
int  a 
)

Sets the color to be used for clearing the frame buffer.

Parameters:
rColor R value (0-255)
gColor G value (0-255)
bColor B value (0-255)
aColor A value (0-255)
void SetClearColor ( float  r,
float  g,
float  b,
float  a 
)

Sets the color to be used for clearing the frame buffer.

Parameters:
rColor R value (0.0f-1.0f)
gColor G value (0.0f-1.0f)
bColor B value (0.0f-1.0f)
aColor A value (0.0f-1.0f)
void SetClearDepth ( float  depth)

Sets the depth value to be used for clearing the frame buffer.

Parameters:
depthDepth value (0.0f-1.0f)
void SetClearStencil ( int  stencil)

Sets the stencil value to be used for clearing the frame buffer.

Parameters:
stencilStencil value (0-255)
void SetColorMask ( ColorMask  mask)

Sets the color write mask.

Parameters:
maskColor write mask
void SetCullFace ( CullFaceMode  mode,
CullFaceDirection  direction 
)

Sets back-face culling.

Parameters:
modeBack-face culling mode
directionFront direction for back-face culling
void SetCullFace ( CullFace  face)

Sets back-face culling.

Parameters:
faceStructure representing back-face culling
void SetDepthFunc ( DepthFunc  func)

Sets the depth test function.

Parameters:
funcStructure representing the depth test function
void SetDepthFunc ( DepthFuncMode  mode,
bool  writeMask 
)

Sets the depth test function.

Parameters:
modeDepth test function mode
writeMaskDepth test function write mask
void SetDepthRange ( Vector2  range)

Sets the range for the depth value.

Parameters:
rangeDepth value range
void SetDepthRange ( float  min,
float  max 
)

Sets the range for the depth value.

Parameters:
minMinimum value for the depth value (0.0f-1.0f)
maxMaximum value for the depth value (0.0f-1.0f)
void SetEnableMode ( EnableMode  mode)

Sets the logical OR of the flag that represents whether or not each graphics feature is enabled.

Parameters:
modeLogical OR of the flag that represents whether or not each graphics feature is enabled
void SetFrameBuffer ( FrameBuffer  buffer)

Sets the frame buffer.

Parameters:
bufferFrame buffer (release when NULL)
void SetLineWidth ( float  width)

Sets the line width.

Parameters:
widthLine width
void SetPolygonOffset ( PolygonOffset  offset)

Sets the polygon offset.

Parameters:
offsetStructure representing the polygon offset
void SetPolygonOffset ( float  factor,
float  units 
)

Sets the polygon offset.

Parameters:
factorPolygon offset scaling coefficient
unitsPolygon offset offset coefficient
void SetScissor ( int  x,
int  y,
int  w,
int  h 
)

Sets the rectangle for the scissor test.

Parameters:
xMinimum value for the X coordinate of the rectangle for the scissor test
yMinimum value for the Y coordinate of the rectangle for the scissor test
wWidth of the rectangle for the scissor test
hHeight of the rectangle for the scissor test
void SetScissor ( ImageRect  rectangle)

Sets the rectangle for the scissor test.

Parameters:
rectangleRectangle for the scissor test
void SetShaderProgram ( ShaderProgram  program)

Sets a shader program.

Parameters:
programShader program (release when NULL)
void SetStencilFunc ( StencilFunc  func)

Sets the stencil test function.

Parameters:
funcStructure representing the stencil test function
void SetStencilFunc ( StencilFuncMode  mode,
int  reference,
int  readMask,
int  writeMask 
)

Sets the stencil test function.

Parameters:
modeStencil test function mode
referenceReference value (0-255) of the stencil test function
readMaskRead mask (0-255) of the stencil test function
writeMaskWrite mask (0-255) of the stencil test function
void SetStencilFuncBack ( StencilFuncMode  mode,
int  reference,
int  readMask,
int  writeMask 
)

Sets the stencil test function (for the back surface)

Parameters:
modeStencil test function mode
referenceReference value (0-255) of the stencil test function
readMaskRead mask (0-255) of the stencil test function
writeMaskWrite mask (0-255) of the stencil test function
void SetStencilFuncBack ( StencilFunc  func)

Sets the stencil test function (for the back surface)

Parameters:
funcStructure representing the stencil test function
void SetStencilFuncFront ( StencilFunc  func)

Sets the stencil test function (for the front surface)

Parameters:
funcStructure representing the stencil test function
void SetStencilFuncFront ( StencilFuncMode  mode,
int  reference,
int  readMask,
int  writeMask 
)

Sets the stencil test function (for the front surface)

Parameters:
modeStencil test function mode
referenceReference value (0-255) of the stencil test function
readMaskRead mask (0-255) of the stencil test function
writeMaskWrite mask (0-255) of the stencil test function
void SetStencilOp ( StencilOpMode  fail,
StencilOpMode  zFail,
StencilOpMode  zPass 
)

Sets the stencil test operation.

Parameters:
failStencil failure mode of the stencil test operation
zFailDepth failure mode of the stencil test operation
zPassDepth passing mode of the stencil test operation
void SetStencilOp ( StencilOp  op)

Sets the stencil test operation.

Parameters:
opStructure representing the stencil test operation
void SetStencilOpBack ( StencilOpMode  fail,
StencilOpMode  zFail,
StencilOpMode  zPass 
)

Sets the stencil test operation (for the back surface)

Parameters:
failStencil failure mode of the stencil test operation
zFailDepth failure mode of the stencil test operation
zPassDepth passing mode of the stencil test operation
void SetStencilOpBack ( StencilOp  op)

Sets the stencil test operation (for the back surface)

Parameters:
opStructure representing the stencil test operation
void SetStencilOpFront ( StencilOpMode  fail,
StencilOpMode  zFail,
StencilOpMode  zPass 
)

Sets the stencil test operation (for the front surface)

Parameters:
failStencil failure mode of the stencil test operation
zFailDepth failure mode of the stencil test operation
zPassDepth passing mode of the stencil test operation
void SetStencilOpFront ( StencilOp  op)

Sets the stencil test operation (for the front surface)

Parameters:
opStructure representing the stencil test operation
void SetTexture ( int  index,
Texture  texture 
)

Sets the texture.

Parameters:
indexTexture number (0-7)
textureTexture (release when NULL)
void SetVertexBuffer ( int  index,
VertexBuffer  buffer 
)

Sets the vertex buffer.

Parameters:
indexVertex buffer number (0-3)
bufferVertex buffer (release when NULL)
void SetViewport ( int  x,
int  y,
int  w,
int  h 
)

Sets the rectangle of the viewport.

Parameters:
xMinimum value for the X coordinate of the rectangle for the viewport
yMinimum value for the Y coordinate of the rectangle for the viewport
wWidth of the viewport rectangle
hHeight of the viewport rectangle
void SetViewport ( ImageRect  rectangle)

Sets the rectangle of the viewport.

Parameters:
rectangleViewport rectangle

Property Documentation

GraphicsCaps Caps [get]

Class representing the graphics capacity.

This is used to obtain the allowable range of the parameters and supported extensions.

FrameBuffer Screen [get]

Frame buffer representing the default screen.

This is used to set the default screen to the frame buffer and obtain the screen size and pixel format. This frame buffer is read-only, and the color target and depth target cannot be changed.

ImageSize [] ScreenSizes [static, get]

Array of the screen size that can be specified upon initialization.

This is used to determine the screen size to be specified when creating the graphics context. This is a static property, and it can be used even before creating the graphics context.