Class representing the graphics context. More...
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. |
Class representing the graphics context.
GraphicsContext | ( | ) |
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)
width | Screen width (default if 0) |
height | Screen height (default if 0) |
colorFormat | Screen color format (default if PixelFormat.None) |
depthFormat | Screen depth format (default if PixelFormat.None) |
multiSampleMode | Screen 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.
void Clear | ( | ClearMask | mask | ) |
Clears the frame buffer (with mask)
mask | Buffer clear mask |
void Disable | ( | EnableMode | mode | ) |
Disables the specified graphics feature.
mode | Graphics feature to enable or disable |
void DrawArrays | ( | Primitive[] | primitives | ) |
Renders the primitive (for a primitive array)
primitives | Primitive array |
void DrawArrays | ( | Primitive[] | primitives, |
int | first, | ||
int | count | ||
) |
Renders the primitive (for primitive array, with specified range)
primitives | Primitive array |
first | Starting number for primitives |
count | Number of primitives |
void DrawArrays | ( | DrawMode | mode, |
int | first, | ||
int | count | ||
) |
Renders the primitive.
mode | Primitive rendering mode |
first | Starting vertex of the primitive |
count | Number of vertices in the primitive |
void DrawArrays | ( | DrawMode | mode, |
int | first, | ||
int | count, | ||
int | repeat | ||
) |
Renders the primitive (for multiple primitives)
mode | Primitive rendering mode |
first | Starting vertex of the primitive |
count | Number of vertices in the primitive |
repeat | Number of primitives |
Renders multiple primitives.
void DrawArraysInstanced | ( | DrawMode | mode, |
int | first, | ||
int | count, | ||
int | instFirst, | ||
int | instCount | ||
) |
Renders the primitive (for instance rendering)
mode | Primitive rendering mode |
first | Starting vertex of the primitive |
count | Number of vertices in the primitive |
instFirst | Starting number of the instance |
instCount | Number 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.
void Enable | ( | EnableMode | mode, |
bool | status | ||
) |
Enables or disables the specified graphics feature.
mode | Graphics feature to enable or disable |
status | Specify true to enable |
void Enable | ( | EnableMode | mode | ) |
Enables the specified graphics feature.
mode | Graphics feature to enable or disable |
BlendFunc GetBlendFunc | ( | ) |
Obtains the alpha-blending function.
BlendFunc GetBlendFuncAlpha | ( | ) |
Obtains the alpha-blending function (for the alpha channel)
BlendFunc GetBlendFuncRgb | ( | ) |
Obtains the alpha-blending function (for the RGB channel)
Vector4 GetClearColor | ( | ) |
Obtains the color to be used for clearing the frame buffer.
float GetClearDepth | ( | ) |
Obtains 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.
ColorMask GetColorMask | ( | ) |
Obtains the color write mask.
CullFace GetCullFace | ( | ) |
Obtains back-face culling.
DepthFunc GetDepthFunc | ( | ) |
Obtains the depth test function.
Vector2 GetDepthRange | ( | ) |
Obtains the range for the depth value.
EnableMode GetEnableMode | ( | ) |
Obtains the logical OR of the flag that represents whether or not each graphics feature is enabled.
FrameBuffer GetFrameBuffer | ( | ) |
Obtains the frame buffer.
float GetLineWidth | ( | ) |
Obtains the line width.
PolygonOffset GetPolygonOffset | ( | ) |
Obtains the polygon offset.
ImageRect GetScissor | ( | ) |
Obtains the rectangle for the scissor test.
ShaderProgram GetShaderProgram | ( | ) |
Obtains the shader program.
StencilFunc GetStencilFunc | ( | ) |
Obtains the stencil test function.
StencilFunc GetStencilFuncBack | ( | ) |
Obtains the stencil test function (for the back surface)
StencilFunc GetStencilFuncFront | ( | ) |
Obtains the stencil test function (for the front surface)
StencilOp GetStencilOp | ( | ) |
Obtains the stencil test operation.
StencilOp GetStencilOpBack | ( | ) |
Obtains the stencil test operation (for the back surface)
StencilOp GetStencilOpFront | ( | ) |
Obtains the stencil test operation (for the front surface)
Texture GetTexture | ( | int | index | ) |
VertexBuffer GetVertexBuffer | ( | int | index | ) |
Obtains the vertex buffer.
index | Vertex buffer number (0-3) |
ImageRect GetViewport | ( | ) |
Obtains the rectangle of the viewport.
bool IsEnabled | ( | EnableMode | mode | ) |
Obtains whether or not the specified graphics feature is enabled.
mode | Graphics feature to enable or disable |
void ReadPixels | ( | byte[] | pixels, |
PixelFormat | format, | ||
int | sx, | ||
int | sy, | ||
int | sw, | ||
int | sh | ||
) |
Reads the pixels of the frame buffer.
pixels | Pixel data storing destination |
format | Pixel format |
sx | X coordinate of the transfer source |
sy | Y coordinate of the transfer source |
sw | Width of the transfer source |
sh | Height 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)
texture | 2D texture |
level | Mipmap level (0 to LevelCount-1) |
dx | X coordinate of the transfer destination |
dy | Y coordinate of the transfer destination |
sx | X coordinate of the transfer source |
sy | Y coordinate of the transfer source |
sw | Width of the transfer source |
sh | Height 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)
texture | Cube texture |
level | Mipmap level (0 to LevelCount-1) |
cubeFace | Cube surface |
dx | X coordinate of the transfer destination |
dy | Y coordinate of the transfer destination |
sx | X coordinate of the transfer source |
sy | Y coordinate of the transfer source |
sw | Width of the transfer source |
sh | Height 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.
func | Structure representing the alpha-blending function |
void SetBlendFunc | ( | BlendFuncMode | mode, |
BlendFuncFactor | srcFactor, | ||
BlendFuncFactor | dstFactor | ||
) |
Sets the alpha-blending function.
mode | Alpha-blending function mode |
srcFactor | Alpha-blending function source coefficient |
dstFactor | Alpha-blending function destination coefficient |
void SetBlendFuncAlpha | ( | BlendFunc | func | ) |
Sets the alpha-blending function (for the alpha channel)
func | Structure representing the alpha-blending function |
void SetBlendFuncAlpha | ( | BlendFuncMode | mode, |
BlendFuncFactor | srcFactor, | ||
BlendFuncFactor | dstFactor | ||
) |
Sets the alpha-blending function (for the alpha channel)
mode | Alpha-blending function mode |
srcFactor | Alpha-blending function source coefficient |
dstFactor | Alpha-blending function destination coefficient |
void SetBlendFuncRgb | ( | BlendFuncMode | mode, |
BlendFuncFactor | srcFactor, | ||
BlendFuncFactor | dstFactor | ||
) |
Sets the alpha-blending function (for the RGB channel)
mode | Alpha-blending function mode |
srcFactor | Alpha-blending function source coefficient |
dstFactor | Alpha-blending function destination coefficient |
void SetBlendFuncRgb | ( | BlendFunc | func | ) |
Sets the alpha-blending function (for the RGB channel)
func | Structure representing the alpha-blending function |
void SetClearColor | ( | Vector4 | color | ) |
Sets the color to be used for clearing the frame buffer.
color | Color |
void SetClearColor | ( | int | r, |
int | g, | ||
int | b, | ||
int | a | ||
) |
Sets the color to be used for clearing the frame buffer.
r | Color R value (0-255) |
g | Color G value (0-255) |
b | Color B value (0-255) |
a | Color 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.
r | Color R value (0.0f-1.0f) |
g | Color G value (0.0f-1.0f) |
b | Color B value (0.0f-1.0f) |
a | Color A value (0.0f-1.0f) |
void SetClearDepth | ( | float | depth | ) |
Sets the depth value to be used for clearing the frame buffer.
depth | Depth value (0.0f-1.0f) |
void SetClearStencil | ( | int | stencil | ) |
Sets the stencil value to be used for clearing the frame buffer.
stencil | Stencil value (0-255) |
void SetColorMask | ( | ColorMask | mask | ) |
Sets the color write mask.
mask | Color write mask |
void SetCullFace | ( | CullFaceMode | mode, |
CullFaceDirection | direction | ||
) |
Sets back-face culling.
mode | Back-face culling mode |
direction | Front direction for back-face culling |
void SetCullFace | ( | CullFace | face | ) |
Sets back-face culling.
face | Structure representing back-face culling |
void SetDepthFunc | ( | DepthFunc | func | ) |
Sets the depth test function.
func | Structure representing the depth test function |
void SetDepthFunc | ( | DepthFuncMode | mode, |
bool | writeMask | ||
) |
Sets the depth test function.
mode | Depth test function mode |
writeMask | Depth test function write mask |
void SetDepthRange | ( | Vector2 | range | ) |
Sets the range for the depth value.
range | Depth value range |
void SetDepthRange | ( | float | min, |
float | max | ||
) |
Sets the range for the depth value.
min | Minimum value for the depth value (0.0f-1.0f) |
max | Maximum 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.
mode | Logical OR of the flag that represents whether or not each graphics feature is enabled |
void SetFrameBuffer | ( | FrameBuffer | buffer | ) |
Sets the frame buffer.
buffer | Frame buffer (release when NULL) |
void SetLineWidth | ( | float | width | ) |
Sets the line width.
width | Line width |
void SetPolygonOffset | ( | PolygonOffset | offset | ) |
Sets the polygon offset.
offset | Structure representing the polygon offset |
void SetPolygonOffset | ( | float | factor, |
float | units | ||
) |
Sets the polygon offset.
factor | Polygon offset scaling coefficient |
units | Polygon offset offset coefficient |
void SetScissor | ( | int | x, |
int | y, | ||
int | w, | ||
int | h | ||
) |
Sets the rectangle for the scissor test.
x | Minimum value for the X coordinate of the rectangle for the scissor test |
y | Minimum value for the Y coordinate of the rectangle for the scissor test |
w | Width of the rectangle for the scissor test |
h | Height of the rectangle for the scissor test |
void SetScissor | ( | ImageRect | rectangle | ) |
Sets the rectangle for the scissor test.
rectangle | Rectangle for the scissor test |
void SetShaderProgram | ( | ShaderProgram | program | ) |
Sets a shader program.
program | Shader program (release when NULL) |
void SetStencilFunc | ( | StencilFunc | func | ) |
Sets the stencil test function.
func | Structure representing the stencil test function |
void SetStencilFunc | ( | StencilFuncMode | mode, |
int | reference, | ||
int | readMask, | ||
int | writeMask | ||
) |
Sets the stencil test function.
mode | Stencil test function mode |
reference | Reference value (0-255) of the stencil test function |
readMask | Read mask (0-255) of the stencil test function |
writeMask | Write 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)
mode | Stencil test function mode |
reference | Reference value (0-255) of the stencil test function |
readMask | Read mask (0-255) of the stencil test function |
writeMask | Write mask (0-255) of the stencil test function |
void SetStencilFuncBack | ( | StencilFunc | func | ) |
Sets the stencil test function (for the back surface)
func | Structure representing the stencil test function |
void SetStencilFuncFront | ( | StencilFunc | func | ) |
Sets the stencil test function (for the front surface)
func | Structure representing the stencil test function |
void SetStencilFuncFront | ( | StencilFuncMode | mode, |
int | reference, | ||
int | readMask, | ||
int | writeMask | ||
) |
Sets the stencil test function (for the front surface)
mode | Stencil test function mode |
reference | Reference value (0-255) of the stencil test function |
readMask | Read mask (0-255) of the stencil test function |
writeMask | Write mask (0-255) of the stencil test function |
void SetStencilOp | ( | StencilOpMode | fail, |
StencilOpMode | zFail, | ||
StencilOpMode | zPass | ||
) |
Sets the stencil test operation.
fail | Stencil failure mode of the stencil test operation |
zFail | Depth failure mode of the stencil test operation |
zPass | Depth passing mode of the stencil test operation |
void SetStencilOp | ( | StencilOp | op | ) |
Sets the stencil test operation.
op | Structure representing the stencil test operation |
void SetStencilOpBack | ( | StencilOpMode | fail, |
StencilOpMode | zFail, | ||
StencilOpMode | zPass | ||
) |
Sets the stencil test operation (for the back surface)
fail | Stencil failure mode of the stencil test operation |
zFail | Depth failure mode of the stencil test operation |
zPass | Depth passing mode of the stencil test operation |
void SetStencilOpBack | ( | StencilOp | op | ) |
Sets the stencil test operation (for the back surface)
op | Structure representing the stencil test operation |
void SetStencilOpFront | ( | StencilOpMode | fail, |
StencilOpMode | zFail, | ||
StencilOpMode | zPass | ||
) |
Sets the stencil test operation (for the front surface)
fail | Stencil failure mode of the stencil test operation |
zFail | Depth failure mode of the stencil test operation |
zPass | Depth passing mode of the stencil test operation |
void SetStencilOpFront | ( | StencilOp | op | ) |
Sets the stencil test operation (for the front surface)
op | Structure representing the stencil test operation |
void SetTexture | ( | int | index, |
Texture | texture | ||
) |
void SetVertexBuffer | ( | int | index, |
VertexBuffer | buffer | ||
) |
Sets the vertex buffer.
index | Vertex buffer number (0-3) |
buffer | Vertex buffer (release when NULL) |
void SetViewport | ( | int | x, |
int | y, | ||
int | w, | ||
int | h | ||
) |
Sets the rectangle of the viewport.
x | Minimum value for the X coordinate of the rectangle for the viewport |
y | Minimum value for the Y coordinate of the rectangle for the viewport |
w | Width of the viewport rectangle |
h | Height of the viewport rectangle |
void SetViewport | ( | ImageRect | rectangle | ) |
Sets the rectangle of the viewport.
rectangle | Viewport rectangle |
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.