CreateRenderImage

Family: Image · 2 forms

What it does

CreateRenderImage brings an Image object into being: it is how the rest of the program comes to have one. It takes imageID (an integer), width (an integer), height (an integer), format (an integer) and mipmap (an integer), and returns nothing. That is the first of 2 forms. imageID is the id you are giving an Image object: every later call names it by that number.

Syntax

1
CreateRenderImage(imageID integer, width integer, height integer, format integer, mipmap integer)
2
CreateRenderImage(width integer, height integer, format integer, mipmap integer) → integer

Parameters

NameTypeIn forms
imageIDinteger1
widthintegerall
heightintegerall
formatintegerall
mipmapintegerall

What each form returns

1CreateRenderImage(1, 64, 64, 1, 1)nothing
2renderImage = CreateRenderImage(64, 64, 1, 1)integer

Example · generated

Form 1, you choose the id yourself

CreateRenderImage(1, 64, 64, 1, 1)DO  Sync()LOOP

Form 2, the command hands back the id

renderImage = CreateRenderImage(64, 64, 1, 1)DO  Sync()LOOP

CreateRenderImage is called with values of the types its signature asks for. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

Related commands

35 commands in Image