buffer_get_address

Get the raw, aligned, buffer address.

Syntax:

buffer_get_address(buffer);


Argument Description
buffer The index of the buffer to use.


Returns: pointer


Description

With this function you can get the a pointer to the raw, aligned buffer address. This is primarily for use with extensions as you can pass this value through to them, allowing them to access the buffer data. Note that there are a few things you cannot do with the buffer when accessing from an extension:


Example:

var b_address = buffer_get_address(buff_model);
var b_end_address = b_address + buffer_get_size(buff_model);

The above code will get the memory address of the buffer indexed in the variable "buff_model" and then get the memory address for the end of the buffer using the buffer_get_size() function, storing both values in local variables for further use.


Back: Buffers
Next: buffer_get_size
© Copyright YoYo Games Ltd. 2018 All Rights Reserved