niRenderer⚓︎
The Morrowind's renderer class.
This type inherits the following: niObject
Properties⚓︎
refCount
⚓︎
Read-only. The number of references that exist for this object. When this value reaches zero, the object will be deleted.
Returns:
result
(number)
RTTI
⚓︎
Read-only. The runtime type information for this object. This is an alias for the .runTimeTypeInformation
property.
Returns:
result
(niRTTI)
runTimeTypeInformation
⚓︎
Read-only. The runtime type information for this object.
Returns:
result
(niRTTI)
Methods⚓︎
clone
⚓︎
Creates a copy of this object.
local result = myObject:clone()
Returns:
result
(niObject)
isInstanceOfType
⚓︎
Determines if the object is of a given type, or of a type derived from the given type.
local result = myObject:isInstanceOfType(type)
Parameters:
Returns:
result
(boolean)
isOfType
⚓︎
Determines if the object is of a given type.
local result = myObject:isOfType(type)
Parameters:
Returns:
result
(boolean)
saveBinary
⚓︎
Serializes the object, and writes it to the given file.
local success = myObject:saveBinary(path)
Parameters:
path
(string): The path to write the file at, relative to the Morrowind installation folder.
Returns:
success
(boolean): If true the object was successfully serialized.
setRenderTarget
⚓︎
This method changes the active rendering target to the provided texture.
local result = myObject:setRenderTarget(texture)
Parameters:
texture
(niRenderedTexture): Default:nil
. Set tonil
to reset to the default rendering target.
Returns:
result
(boolean)
takeScreenshot
⚓︎
This method returns the last rendered frame in the form of niPixelData.
local screenshot = myObject:takeScreenshot(bounds)
Parameters:
bounds
(integer[]): Optional. These four values are used to take only a specific sub region (in pixels) from the framebuffer. If not provided, the taken screenshot will include the whole screen.
Returns:
screenshot
(niPixelData)