BBMOD_BaseRenderer

Extends BBMOD_Class

constructor

new BBMOD_BaseRenderer()

Description

Base struct for renderers, which execute render commands created with method render.

Properties

Name Description
ButtonSelect The mouse button used to select instances when edit mode is enabled. Default value is mb_left.
EditMode If true then edit mode is enabled. Default value is false.
EnableMousepick If true then mousepicking of gizmo and instances is enabled. Default value is true.
EnablePostProcessing OBSOLETE Enables post-processing effects. Defaults to false. Enabling this requires the Post-processing submodule!
EnableShadows Enables rendering into a shadowmap in the shadows render pass. Defauls to false.
Gizmo A gizmo for transforming instances when BBMOD_BaseRenderer.EditMode is enabled. This is by default undefined.
Height The height of the renderer on the screen. If undefined then the window height is used. Default value is undefined.
InstanceHighlightColor Outline color of instances selected by gizmo. Default value is BBMOD_C_ORANGE.
KeyMultiSelect The keyboard key used to add/remove instances from multiple selection when edit mode is enabled. Default value is vk_shift.
PostProcessor Handles post-processing effects if isn't undefined and BBMOD_BaseRenderer.UseAppSurface is enabled. Default value is undefined.
RenderInstanceIDs If true then rendering of instance IDs into an off-screen surface is enabled. This must be enabled if you would like to use method BBMOD_BaseRenderer.get_instance_id for mouse-picking instances. Default value is false.
RenderScale Resolution multiplier for the application_surface. BBMOD_BaseRenderer.UseAppSurface must be enabled for this to have any effect. Defaults to 1. Use lower values to improve framerate.
Renderables An array of renderable objects and structs. These are automatically rendered in BBMOD_BaseRenderer.render.
ShadowmapArea OBSOLETE The area captured by the shadowmap. Defaults to 1024.
ShadowmapNormalOffset When rendering shadows, offsets vertex position by its normal scaled by this value. Defaults to 1. Increasing the value can remove some artifacts but using too high value could make the objects appear flying above the ground.
ShadowmapResolution OBSOLETE The resolution of the shadowmap surface. Must be power of 2. Defaults to 4096.
UseAppSurface Set to true to enable the application_surface. Use method BBMOD_BaseRenderer.present to draw the application_surface to the screen. Defaults to false.
Width The width of the renderer on the screen. If undefined then the window width is used. Default value is undefined.
X The X position of the renderer on the screen. Default value is 0.
Y The Y position of the renderer on the screen. Default value is 0.

Methods

Name Description
add Adds a renderable object or struct to the renderer.
get_height Retrieves the height of the renderer on the screen.
get_instance_id Retrieves an ID of an instance at given position on the screen.
get_render_height Retrieves the height of the renderer with BBMOD_BaseRenderer.RenderScale applied.
get_render_width Retrieves the width of the renderer with BBMOD_BaseRenderer.RenderScale applied.
get_width Retrieves the width of the renderer on the screen.
present Presents the rendered graphics on the screen, with post-processing applied (if BBMOD_BaseRenderer.PostProcessor is defined).
remove Removes a renderable object or a struct from the renderer.
render Renders all added renderables to the current render target.
set_position Changes the renderer's position on the screen.
set_rectangle Changes the renderer's position and size on the screen.
set_size Changes the renderer's size on the screen.
update Updates the renderer. This should be called in the Step event.

See also

BBMOD_DefaultRenderer

Do you find this page helpful?

Copyright © 2023, BlueBurn. Built on February 04, 2023 using GMDoc.