Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    Low-level API

    Advanced Programmer

    The GraphicsDevice class is the central class for displaying your game. It's used to create resources and present images on the screen. You can access it as a member of the Game and ScriptComponent classes.

    Actions such as drawing, setting graphics states and using resources are recorded using CommandList objects for later execution by the device.

    Many command lists can be filled at the same time (eg one per thread). A default command list is available as member of the GraphicsContext of your Game.

    In methods, these objects are typically provided through contexts such as RenderContext and RenderDrawContext.

    Performing any drawing requires multiple steps, including:

    • setting textures as render textures, clearing them, and setting viewports and scissors
    • setting up the graphics pipeline state, including input description, shaders, depth-stencil, blending, rasterizer, etc
    • binding resources, such as constant buffers and textures
    • drawing vertices using built-in primitives or custom vertex buffers

    In this section

    • Draw vertices
    • Pipeline state
    • Resources
    • SpriteBatch
    • SpriteFont
    • Textures and render textures
    • Improve this Doc
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation