CRopen: Opens a window, initializes graphics and related structures.

View source: R/CRopen.R

CRopenR Documentation

Opens a window, initializes graphics and related structures.

Description

Opens a window, intitializes graphics structures, creates event for polling event queue, measures frame-rate etc.

Usage

CRopen(x = 0, y = 0, w = 0, h = 0, param = c(), status = NULL)

Arguments

x

X position of window.

y

Y position of window.

w

Width of window.

h

Height of window.

param

Optional vector of flags ("render_scale_quality", "borderless", "resizable", "maximized", "minimized", "high_dpi", "no_vsync", "no_input_focus", "no_on_top").

status

Optional list status with elements value and message to retrieve warnings and error messages.

Details

CRopen calls SDL functions to open a window, get window surface and renderer, and initialize R pointers to structures required later; with default arguments x = y = w = h = 0, a full-screen window is opened.

Value

Returns a graphics_list containing pointers to graphics structures and integers of width and height of window, as well as other technical information. Also contains integer "valid", which is 1 if evertyhing was set up correctly, 0 otherwise.

Examples

    gs <- CRopen( 50, 50, 500, 500 )
    
    CRwait_ms(1000)
    
    CRclose(gs)

lorweiuk/CREx documentation built on March 16, 2024, 3:04 a.m.