GFX
  • Docs
  • API
Search Results for

    Show / Hide Table of Contents
    • Genesis.Core
      • AssetManager
      • Game
      • GameElement
      • GameEventHandler
      • GenesisWindow
      • IGameBehavior
      • Input
      • Layer
      • Light
      • Scene
      • Scene3D
      • SceneEventHandler
      • SceneSizeEvenHandler
      • Storage
      • Utils
    • Genesis.Core.Behaviors
      • AnimationBehavior
      • CameraFlags
      • CharacterController2D
      • ControllerPreset
      • MoveDirection
      • MovementFlags
      • SpriteMovementController
    • Genesis.Core.Behaviors.Physics2D
      • BufferedSpriteCollider
      • PhysicsBox2D
      • PhysicsPolygon2D
      • Rigidbody2D
    • Genesis.Core.Behaviors.Physics3D
      • BoxCollider
      • CapsuleCollider
      • ConvexHullBehavior
      • QubeConvexHull
      • SphereCollider
      • StaticMeshBehavior
    • Genesis.Core.Behaviors._3D
      • Stance
      • ThirdpersonCharacterController
    • Genesis.Core.GameElements
      • BufferedSprite
      • CameraElement
      • Element3D
      • Empty
      • Model
      • ParticleBuffers
      • ParticleDeffinition
      • ParticleEmitter
      • Qube
      • RectElement
      • Skybox
      • Sprite
      • SpriteShapeDeffinition
      • Terrain2D
      • Terrain3D
      • TerrainData
    • Genesis.Graphics
      • Animation
      • Camera
      • CameraType
      • Face
      • Font
      • Framebuffer
      • Glyphe
      • IRenderDevice
      • Material
      • MaterialBuffer
      • Mesh
      • PerspectiveCamera
      • Shader
      • ShaderProgram
      • TexCoords
      • Texture
      • Viewport
    • Genesis.Graphics.Animation3D
      • Animation
      • Animator
      • AssimpNodeData
      • Bone
      • KeyPosition
      • KeyRotation
      • KeyScale
      • ModelMesh
      • boneinfo
      • vertex
    • Genesis.Graphics.Physics
      • BulletDebugRenderer
    • Genesis.Graphics.RenderDevice
      • ClassicGL
      • GLRenderer
    • Genesis.Graphics.Shaders.OpenGL
      • AnimatedModelShader
      • BasicShader
      • DiffuseLightning
      • DiffuseNormalLightning
      • DiffuseNormalShader
      • DiffuseShader
      • DiffuseSolidShader
      • MVPRectShader
      • MVPShader
      • MVPSolidShader
      • ParticleShader
      • ScreenShader
      • SkyboxShader
      • SpriteShader
      • TerrainShader
      • WireframeShader
    • Genesis.Graphics.Shapes
      • BufferedSpriteShape
      • FrameShape
      • GlypheShape
      • LineShape
      • PlaneShape
      • QubeShape
      • RectShape
      • Shape
      • SpriteShape
    • Genesis.Math
      • Matrix4x4
      • NoisePoint
      • PerlinNoise
      • Rect
      • Vec3
    • Genesis.Physics
      • Aabb
      • HitResult
      • MatrixSet
      • MouseRay2
      • PhysicHandler
      • PhysicHandlerEvent
      • PhysicPropeterys
      • PhysicsBehavior
      • PhysicsBehaviorEvent
      • PhysicsHandler2D
      • PhysicsHandler3D
      • Raycast
    • Genesis.UI
      • Canvas
      • ImageButton
      • Label
      • ListItem
      • ListItemBehavior
      • ListSelector
      • ListSelectorBehavior
      • Panel
      • ProgressBar
      • UIEvent
      • UIParseHandler
      • UIParser
      • Widget

    Interface IRenderDevice

    Interface for a rendering device that handles graphics rendering operations.

    Namespace: Genesis.Graphics
    Assembly: Genesis.dll
    Syntax
    public interface IRenderDevice

    Methods

    Begin()

    Begins the rendering process.

    Declaration
    void Begin()

    BuildFramebuffer(int, int)

    Builds a framebuffer with the specified width and height.

    Declaration
    Framebuffer BuildFramebuffer(int width, int height)
    Parameters
    Type Name Description
    int width

    The width of the framebuffer.

    int height

    The height of the framebuffer.

    Returns
    Type Description
    Framebuffer

    The built framebuffer.

    BuildFramebuffer(int, int, Texture)

    Builds a framebuffer with the specified width, height, and texture.

    Declaration
    Framebuffer BuildFramebuffer(int width, int height, Texture texture)
    Parameters
    Type Name Description
    int width

    The width of the framebuffer.

    int height

    The height of the framebuffer.

    Texture texture

    The texture associated with the framebuffer.

    Returns
    Type Description
    Framebuffer

    The built framebuffer.

    BuildFramebuffer(int, int, int)

    Builds a framebuffer with the specified width, height, and texture ID.

    Declaration
    Framebuffer BuildFramebuffer(int width, int height, int texture)
    Parameters
    Type Name Description
    int width

    The width of the framebuffer.

    int height

    The height of the framebuffer.

    int texture

    The ID of the texture associated with the framebuffer.

    Returns
    Type Description
    Framebuffer

    The built framebuffer.

    CreateDynamicVertexBuffer(float[])

    Creates a dynamic vertex buffer with the specified float array.

    Declaration
    int CreateDynamicVertexBuffer(float[] floats)
    Parameters
    Type Name Description
    float[] floats

    The float array for the dynamic vertex buffer.

    Returns
    Type Description
    int

    The ID of the created dynamic vertex buffer.

    CreateStaticVertexBuffer(float[])

    Creates a static vertex buffer with the specified vertices.

    Declaration
    int CreateStaticVertexBuffer(float[] verticies)
    Parameters
    Type Name Description
    float[] verticies

    The vertices for the static vertex buffer.

    Returns
    Type Description
    int

    The ID of the created static vertex buffer.

    Dispose()

    Disposes of the rendering device and releases any resources.

    Declaration
    void Dispose()

    DisposeElement(GameElement)

    Disposes the game element

    Declaration
    void DisposeElement(GameElement element)
    Parameters
    Type Name Description
    GameElement element

    The element to dispose

    DisposeElement3D(Element3D)

    Disposes the specified 3D element, freeing up resources.

    Declaration
    void DisposeElement3D(Element3D element)
    Parameters
    Type Name Description
    Element3D element

    The 3D element to dispose.

    DisposeFont(Font)

    Disposes the specified font, freeing up resources.

    Declaration
    void DisposeFont(Font font)
    Parameters
    Type Name Description
    Font font

    The font to dispose.

    DisposeTexture(Texture)

    Disposes the specified texture, freeing up resources.

    Declaration
    void DisposeTexture(Texture texture)
    Parameters
    Type Name Description
    Texture texture

    The texture to dispose.

    DrawBufferedSprite(BufferedSprite)

    Draws a buffered sprite in the current rendering context.

    Declaration
    void DrawBufferedSprite(BufferedSprite bufferedSprite)
    Parameters
    Type Name Description
    BufferedSprite bufferedSprite

    The buffered sprite to draw.

    DrawElement3D(Element3D)

    Draws a 3D element in the current rendering context.

    Declaration
    void DrawElement3D(Element3D element)
    Parameters
    Type Name Description
    Element3D element

    The 3D element to draw.

    DrawGameElement(GameElement)

    Draws a game element in the current rendering context.

    Declaration
    void DrawGameElement(GameElement element)
    Parameters
    Type Name Description
    GameElement element

    The game element to draw.

    DrawLine(Vec3, Vec3, Color)

    Draws a line with specified starting and ending points and color in the current rendering context.

    Declaration
    void DrawLine(Vec3 from, Vec3 to, Color color)
    Parameters
    Type Name Description
    Vec3 from

    The starting point of the line.

    Vec3 to

    The ending point of the line.

    Color color

    The color of the line.

    DrawMesh(Mesh, Color)

    Draws a mesh with specified mesh and color in the current rendering context.

    Declaration
    void DrawMesh(Mesh mesh, Color color)
    Parameters
    Type Name Description
    Mesh mesh

    The mesh to draw.

    Color color

    The color of the mesh.

    DrawRect(Rect, Color)

    Draws a colored rectangle with specified position and size in the current rendering context.

    Declaration
    void DrawRect(Rect rect, Color color)
    Parameters
    Type Name Description
    Rect rect

    The rectangle to draw.

    Color color

    The color of the rectangle.

    DrawRect(Rect, Color, float)

    Draws a colored rectangle with specified position, size, and border width in the current rendering context.

    Declaration
    void DrawRect(Rect rect, Color color, float borderWidth)
    Parameters
    Type Name Description
    Rect rect

    The rectangle to draw.

    Color color

    The color of the rectangle.

    float borderWidth

    The width of the rectangle border.

    DrawSkyBox(Skybox)

    Draws a skybox in the current rendering context.

    Declaration
    void DrawSkyBox(Skybox skybox)
    Parameters
    Type Name Description
    Skybox skybox

    The skybox to draw.

    DrawSprite(Sprite)

    Draws a sprite in the current rendering context.

    Declaration
    void DrawSprite(Sprite sprite)
    Parameters
    Type Name Description
    Sprite sprite

    The sprite to draw.

    DrawSprite(Vec3, Vec3, Texture)

    Draws a sprite with specified location, size, and texture in the current rendering context.

    Declaration
    void DrawSprite(Vec3 location, Vec3 size, Texture texture)
    Parameters
    Type Name Description
    Vec3 location

    The location of the sprite.

    Vec3 size

    The size of the sprite.

    Texture texture

    The texture of the sprite.

    DrawSprite(Vec3, Vec3, Texture, TexCoords)

    Draws a sprite with specified location, size, texture, and texture coordinates in the current rendering context.

    Declaration
    void DrawSprite(Vec3 location, Vec3 size, Texture texture, TexCoords texCoords)
    Parameters
    Type Name Description
    Vec3 location

    The location of the sprite.

    Vec3 size

    The size of the sprite.

    Texture texture

    The texture of the sprite.

    TexCoords texCoords

    The texture coordinates of the sprite.

    DrawSprite(Vec3, Vec3, Color, Texture)

    Draws a sprite with specified location, size, color, and texture in the current rendering context.

    Declaration
    void DrawSprite(Vec3 location, Vec3 size, Color color, Texture texture)
    Parameters
    Type Name Description
    Vec3 location

    The location of the sprite.

    Vec3 size

    The size of the sprite.

    Color color

    The color of the sprite.

    Texture texture

    The texture of the sprite.

    DrawSprite(Vec3, Vec3, Color, Texture, TexCoords)

    Draws a sprite with specified location, size, color, texture, and texture coordinates in the current rendering context.

    Declaration
    void DrawSprite(Vec3 location, Vec3 size, Color color, Texture texture, TexCoords texCoords)
    Parameters
    Type Name Description
    Vec3 location

    The location of the sprite.

    Vec3 size

    The size of the sprite.

    Color color

    The color of the sprite.

    Texture texture

    The texture of the sprite.

    TexCoords texCoords

    The texture coordinates of the sprite.

    DrawString(string, Vec3, float, Font, Color)

    Draws a string with specified text, location, fontsize, font, and color in the current rendering context.

    Declaration
    void DrawString(string text, Vec3 location, float fontsize, Font font, Color color)
    Parameters
    Type Name Description
    string text

    The text to draw.

    Vec3 location

    The location of the text.

    float fontsize

    The fontsize of the text.

    Font font

    The font to use for drawing the text.

    Color color

    The color of the text.

    DrawString(string, Vec3, float, float, Font, Color)

    Draws a string with specified text, location, fontsize, spacing, font, and color in the current rendering context.

    Declaration
    void DrawString(string text, Vec3 location, float fontsize, float spacing, Font font, Color color)
    Parameters
    Type Name Description
    string text

    The text to draw.

    Vec3 location

    The location of the text.

    float fontsize

    The fontsize of the text.

    float spacing

    The spacing between characters.

    Font font

    The font to use for drawing the text.

    Color color

    The color of the text.

    DrawTexture(Vec3, Vec3, float, float, Texture)

    Draws a texture with specified location, size, and texture coordinates in the current rendering context.

    Declaration
    void DrawTexture(Vec3 location, Vec3 size, float repeatX, float repeatY, Texture texture)
    Parameters
    Type Name Description
    Vec3 location

    The location of the texture.

    Vec3 size

    The size of the texture.

    float repeatX

    The horizontal texture repeat factor.

    float repeatY

    The vertical texture repeat factor.

    Texture texture

    The texture to draw.

    DrawVectors(Vec3[], Color)

    Draws vectors with specified positions in the current rendering context.

    Declaration
    void DrawVectors(Vec3[] vecs, Color color)
    Parameters
    Type Name Description
    Vec3[] vecs

    The array of vectors to draw.

    Color color

    The color of the vectors.

    End()

    Ends the rendering process.

    Declaration
    void End()

    FillRect(Rect, Color)

    Fills a colored rectangle with specified position and size in the current rendering context.

    Declaration
    void FillRect(Rect rect, Color color)
    Parameters
    Type Name Description
    Rect rect

    The rectangle to fill.

    Color color

    The color to fill the rectangle with.

    FinishCanvasRendering(Scene, Canvas)

    Finishes the rendering for a canvas within a 2D scene.

    Declaration
    void FinishCanvasRendering(Scene scene, Canvas canvas)
    Parameters
    Type Name Description
    Scene scene

    The 2D scene containing the canvas.

    Canvas canvas

    The canvas to finish rendering.

    FinishSceneRendering(Scene)

    Finishes the rendering for a 2D scene.

    Declaration
    void FinishSceneRendering(Scene scene)
    Parameters
    Type Name Description
    Scene scene

    The 2D scene to finish rendering.

    GetError()

    Gets the last OpenGL error code.

    Declaration
    int GetError()
    Returns
    Type Description
    int

    The error code.

    GetHandle()

    Gets the handle (pointer) to the underlying rendering context.

    Declaration
    IntPtr GetHandle()
    Returns
    Type Description
    IntPtr

    The handle to the rendering context.

    Init()

    Initializes the rendering device.

    Declaration
    void Init()

    InitElement3D(Element3D)

    Initializes a 3D element for rendering.

    Declaration
    void InitElement3D(Element3D element)
    Parameters
    Type Name Description
    Element3D element

    InitGameElement(GameElement)

    Initializes a game element for rendering.

    Declaration
    void InitGameElement(GameElement element)
    Parameters
    Type Name Description
    GameElement element

    InitSprite(Sprite)

    Initializes a sprite for rendering.

    Declaration
    void InitSprite(Sprite sprite)
    Parameters
    Type Name Description
    Sprite sprite

    LoadFont(Font)

    Loads a font into the rendering device.

    Declaration
    void LoadFont(Font font)
    Parameters
    Type Name Description
    Font font

    The font to load.

    LoadTexture(Texture)

    Loads a texture into the rendering device.

    Declaration
    void LoadTexture(Texture texture)
    Parameters
    Type Name Description
    Texture texture

    The texture to load.

    ModelViewMatrix()

    Sets the current rendering matrix to the model-view matrix.

    Declaration
    void ModelViewMatrix()

    PopMatrix()

    Pops the matrix from the top of the matrix stack.

    Declaration
    void PopMatrix()

    PrepareCanvasRendering(Scene, Canvas)

    Prepares the rendering for a canvas within a 2D scene.

    Declaration
    void PrepareCanvasRendering(Scene scene, Canvas canvas)
    Parameters
    Type Name Description
    Scene scene

    The 2D scene containing the canvas.

    Canvas canvas

    The canvas to prepare rendering for.

    PrepareSceneRendering(Scene)

    Prepares the rendering for a 2D scene.

    Declaration
    void PrepareSceneRendering(Scene scene)
    Parameters
    Type Name Description
    Scene scene

    The 2D scene to prepare.

    ProjectionMatrix()

    Sets the current rendering matrix to the projection matrix.

    Declaration
    void ProjectionMatrix()

    PushMatrix()

    Pushes the current matrix onto the matrix stack.

    Declaration
    void PushMatrix()

    Rotate(float, Vec3)

    Rotates the matrix by the specified angle around the given vector.

    Declaration
    void Rotate(float angle, Vec3 vector)
    Parameters
    Type Name Description
    float angle

    The rotation angle in degrees.

    Vec3 vector

    The vector to rotate around.

    SetCamera(Camera)

    Sets the camera for rendering.

    Declaration
    void SetCamera(Camera camera)
    Parameters
    Type Name Description
    Camera camera

    The camera to set.

    SetFramebuffer(Framebuffer)

    Sets the active framebuffer using its ID.

    Declaration
    void SetFramebuffer(Framebuffer framebuffer)
    Parameters
    Type Name Description
    Framebuffer framebuffer

    The ID of the framebuffer to set as active.

    SetFramebuffer(int)

    Sets the active framebuffer using the specified framebuffer object.

    Declaration
    void SetFramebuffer(int framebuffer)
    Parameters
    Type Name Description
    int framebuffer

    The framebuffer to set as active.

    SetLightSource(Light)

    Sets the light source for rendering.

    Declaration
    void SetLightSource(Light light)
    Parameters
    Type Name Description
    Light light

    The light source to set.

    TextureClampS()

    Sets the texture wrapping mode to clamp in the S direction.

    Declaration
    void TextureClampS()

    TextureClampT()

    Sets the texture wrapping mode to clamp in the T direction.

    Declaration
    void TextureClampT()

    TextureRepeatS()

    Sets the texture wrapping mode to repeat in the S direction.

    Declaration
    void TextureRepeatS()

    TextureRepeatT()

    Sets the texture wrapping mode to repeat in the T direction.

    Declaration
    void TextureRepeatT()

    Translate(Vec3)

    Translates the matrix by the specified vector.

    Declaration
    void Translate(Vec3 vector)
    Parameters
    Type Name Description
    Vec3 vector

    The translation vector.

    Translate(float, float, float)

    Translates the matrix by the specified coordinates.

    Declaration
    void Translate(float x, float y, float z)
    Parameters
    Type Name Description
    float x

    The x-coordinate translation.

    float y

    The y-coordinate translation.

    float z

    The z-coordinate translation.

    UpdateFramebufferSize(Framebuffer, int, int)

    Updates the size of the specified framebuffer.

    Declaration
    void UpdateFramebufferSize(Framebuffer framebuffer, int width, int height)
    Parameters
    Type Name Description
    Framebuffer framebuffer

    The framebuffer to update.

    int width

    The new width of the framebuffer.

    int height

    The new height of the framebuffer.

    Viewport(float, float, float, float)

    Sets the viewport for rendering.

    Declaration
    void Viewport(float x, float y, float width, float height)
    Parameters
    Type Name Description
    float x

    The x-coordinate of the viewport.

    float y

    The y-coordinate of the viewport.

    float width

    The width of the viewport.

    float height

    The height of the viewport.

    In this article
    Back to top Generated by DocFX