Expand description
At any point in time, there are 3 frames in progress:
- one frame is fully rendered and being drawn on the screen.
this frame just sits in the frame buffer, and isn't tracked by the display system.
- one frame is being rendered
(frame buffer is being written to by GS, VU1 sending tris to GS, VIF1 feeding VU1)
this frame needs a DMA buffer that is full, and being read by VIF1
- one frame is being set up. The engine is running gameplay code and generating DMA data
this frame also needs a DMA buffer, which is being filled up.
Types
display: basicsource
Fields
type: type
on-screen: int32
last-screen: int32
frames: display-frame
bgcolor: gs-bgcolor
pmode: gs-pmode
clock: clock
session-clock: clock
game-clock: clock
base-clock: clock
real-clock: clock
frame-clock: clock
real-frame-clock: clock
target-clock: clock
entity-clock: clock
part-clock: clock
bg-clock: clock
camera-clock: clock
user0-clock: clock
total-game-clock: clock
time-factor: float
dog-ratio: float
vblank-start-time: int64
total-run-time: int64
run-half-speed: basic
dog-count: float
vu1-enable-user: vu1-renderer-mask
vu1-enable-user-menu: vu1-renderer-mask
force-sync: uint32
Methods
set-time-ratios(obj: display, arg0: float) => floatsource
Set the 'dog ratio'. This should be 1 when the game is running at full speed.
Larger dog ratio means slower.
display-frame: basicsource
Fields
type: type
buffer: dma-buffer
calc-buf: dma-buffer
vu1-buf: dma-buffer
debug-buf: dma-buffer
global-buf: dma-buffer
bucket-group: inline-array
profile-array: profile-array
start-time: int64
run-time: int64
Variables
*post-draw-hook*: functionsource
*pre-draw-hook*: functionsource
DEFAULT_ALL_RENDERERS: unknownsource
Functions
allocate-dma-buffers(arg0: display) => displaysource
Allocate the main, debug, and calc dma buffers.
draw-quad2d(arg0: dma-buffer, arg1: draw-context) => nonesource
Draw a quad that fills the entire context
draw-sprite2d-xy(arg0: dma-buffer, arg1: int, arg2: int, arg3: int, arg4: int, arg5: rgba) => nonesource
Draw a sprite primitive with the given color and dimensions.
draw-sprite2d-xy-absolute(arg0: dma-buffer, arg1: int, arg2: int, arg3: int, arg4: int, arg5: rgba) => nonesource
Draw a sprite primitive, setting the gs-xzyf register to exactly the values specified (no offset/clamp)
get-current-time() => time-framesource
Get the base-clock time.
get-integral-current-time() => uintsource
Get the number of frames that have happened.
reset-display-gs-state(arg0: display, arg1: dma-buffer) => displaysource
screen-gradient(arg0: dma-buffer, arg1: rgba, arg2: rgba, arg3: rgba, arg4: rgba) => nonesource
Fill the screen with a sprite with the given colors.
set-display(arg0: display) => displaysource
Allocate and initialize clocks for the display.