總覽
下列函式可用於透過指令碼建立配置。
這些函式可以直接或間接從可叫用的函式呼叫。如果某些控制流程路徑可能導致從 RenderScript 核心函式呼叫這些函式,系統就會產生編譯器錯誤。
摘要
函式 | |
---|---|
rsCreateAllocation | 建立指定類型的 rs_allocation 物件。 |
rsCreateElement | 建立指定資料類型的 rs_element 物件 |
rsCreatePixelElement | 建立指定資料類型和資料類型的 rs_element 物件 |
rsCreateType | 以指定的元素和形狀屬性建立 rs_type 物件。 |
rsCreateVectorElement | 以指定的資料類型和向量寬度建立 rs_element 物件 |
函式
rsCreateAllocation :建立指定類型的 rs_allocation 物件。
rs_allocation rsCreateAllocation(rs_type 類型); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation(rs_type 類型, rs_allocation_mipmap_control mipmap, uint32_t 使用情形, void* ptr); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation(rs_type 類型, uint32_t 用量); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_char(uint32_t tapX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_char(uint32_t tapX, uint32_t lightY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_char(uint32_t tapX, uint32_t lightY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_char2(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_char2(uint32_t MillX, uint32_t lightY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_char2(uint32_t MillX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_char3(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_char3(uint32_t BitX、uint32_t放下值); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_char3(uint32_t tapX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_char4(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_char4(uint32_t BitX、uint32_t放下值); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_char4(uint32_t MillX, uint32_t lightY, uint32_t暗 Z); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_double(uint32_t進行審查 X); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_double(uint32_t tapX, uint32_t lightY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_double(uint32_t tapX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_double2(uint32_t lightX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_double2(uint32_t tapX, uint32_trayY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_double2(uint32_t MillX, uint32_t lightY, uint32_t暗 Z); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_double3(uint32_t lightX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_double3(uint32_t tapX, uint32_trayY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_double3(uint32_t tapX, uint32_t lightY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_double4(uint32_t lightX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_double4(uint32_t tapX, uint32_trayY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_double4(uint32_t tapX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_float(uint32_t microX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_float(uint32_t BitX, uint32_t lightY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_float(uint32_t microX, uint32_t microY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_float2(uint32_t widthX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_float2(uint32_t MillX, uint32_t暗 Y); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_float2(uint32_t BitX、uint32_t microY、uint32_t進行審查 Z); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_float3(uint32_t widthX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_float3(uint32_t microX, uint32_t smallY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_float3(uint32_t BitX、uint32_t microY、uint32_t進行審查 Z); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_float4(uint32_t widthX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_float4(uint32_t microX, uint32_t找不到) | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_float4(uint32_t BitX、uint32_t microY、uint32_t進行審查 Z); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_half(uint32_t tapX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_half(uint32_t tapX, uint32_t lightY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_half(uint32_t BitX, uint32_t放暗, uint32_t進行審查 Z); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_half2(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_half2(uint32_t MillX, uint32_t放暗); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_half2(uint32_t為單位) | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_half3(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_half3(uint32_t MillX, uint32_t放暗); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_half3(uint32_t tapX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_half4(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_half4(uint32_t tapX, uint32_t放暗 Y); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_half4(uint32_t tapX, uint32_t smallY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_int(uint32_t tapX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_int(uint32_t tapX, uint32_t lightY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_int(uint32_t DillX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_int2(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_int2(uint32_t MillX, uint32_t放暗); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_int2(uint32_t MillX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_int3(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_int3(uint32_t MillX, uint32_t放暗); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_int3(uint32_t MillX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_int4(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_int4(uint32_t MillX, uint32_t放暗); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_int4(uint32_t MillX, uint32_t暗 Y, uint32_t進行審查 Z); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_long(uint32_t tapX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_long(uint32_t BitX, uint32_t放明文); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_long(uint32_t tapX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_long2(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_long2(uint32_t調暗 X、uint32_tY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_long2(uint32_t MillX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_long3(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_long3(uint32_t深色 X、uint32_tY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_long3(uint32_t MillX, uint32_t暗 Y, uint32_t進行審查 Z); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_long4(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_long4(uint32_t深色 X、uint32_tY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_long4(uint32_t MillX, uint32_t暗 Y, uint32_t進行審查 Z); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_short(uint32_t tapX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_short(uint32_t tapX, uint32_t lightY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_short(uint32_t維度) | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_short2(uint32_t tapX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_short2(uint32_tlightX, uint32_tuint32_t<br class="x-1-5">Y); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_short2(uint32_t tapX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_short3(uint32_t tapX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_short3(uint32_t tapX, uint32_t lightY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_short3(uint32_t tapX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_short4(uint32_t tapX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_short4(uint32_t MillX, uint32_t放暗 Y); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_short4(uint32_t MillX, uint32_t暗 Y, uint32_t進行審查 Z); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uchar(uint32_t tapX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uchar(uint32_t tapX, uint32_t lightY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uchar(uint32_t tapX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uchar2(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uchar2(uint32_t tapX, uint32_t lightY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uchar2(uint32_t tapX, uint32_t downY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uchar3(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uchar3(uint32_t tapX, uint32_t lightY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uchar3(uint32_t tapX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uchar4(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uchar4(uint32_t tapX, uint32_t lightY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uchar4(uint32_t tapX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uint(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uint(uint32_t MillX, uint32_t放暗); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uint(uint32_t MillX, uint32_t暗 Y, uint32_t進行審查 Z); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uint2(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uint2(uint32_t MillX, uint32_t放暗); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uint2(uint32_t MillX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uint3(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uint3(uint32_t MillX, uint32_t放暗); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uint3(uint32_t tapX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uint4(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uint4(uint32_t MillX, uint32_t放暗); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_uint4(uint32_t tapX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ulong(uint32_t tapX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ulong(uint32_t BitX, uint32_t找不到) | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ulong(uint32_t為單位) | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ulong2(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ulong2(uint32_t為單位) | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ulong2(uint32_t為單位) | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ulong3(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ulong3(uint32_t BitX、uint32_t放下值); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ulong3(uint32_t tapX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ulong4(uint32_t MillX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ulong4(uint32_t為單位) | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ulong4(uint32_t為單位) | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ushort(uint32_t tapX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ushort(uint32_t tapX, uint32_t smallY); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ushort(uint32_t smallX, uint32_t microY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ushort2(uint32_t lightX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ushort2(uint32_t為單位) | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ushort2(uint32_t tapX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ushort3(uint32_t lightX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ushort3(uint32_t BitX, uint32_t放下)。 | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ushort3(uint32_t tapX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ushort4(uint32_t lightX); | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ushort4(uint32_t BitX, uint32_t放下)。 | 已新增至 API 級別 24。 |
rs_allocation rsCreateAllocation_ushort4(uint32_t tapX, uint32_t tapY, uint32_t lightZ); | 已新增至 API 級別 24。 |
參數
類型 | 分配類型 |
---|---|
使用情況 | 分配範圍的用量標記 |
mipmap | |
使用 | |
Pr | |
調暗 X | |
調暗 | |
暗 Z |
建立指定類型和用途的 rs_allocation 物件。
RS_ALLOCATION_USAGE_script 和 RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE 是唯一支援在 RenderScript 指令碼中建立的配置的用量標記。
您也可以使用 rsCreateAllocation_
例如 rsCreateAllocation_int4() 會傳回指定維度的 int4 資料類型配置。
rsCreateElement :建立指定資料類型的 rs_element 物件
rs_element rsCreateElement(int32_t data_type, int32_t data_Kind, bool is 正規化, uint32_t vecSize); | 已新增至 API 級別 24。 |
rs_element rsCreateElement(rs_data_type data_type); | 已新增至 API 級別 24。 |
參數
資料類型 | 元素的資料類型 |
---|---|
資料種類 | |
正規化 | |
背心 |
建立指定資料類型的 rs_element 物件。元素的資料類型會設為 RS_KIND_USER,vector_width 將會設為 1,表示非向量。
rsCreatePixelElement :建立指定資料類型和資料類型的 rs_element 物件
rs_element rsCreatePixelElement(rs_data_type 資料類型, rs_data_Kind data_Kind); | 已新增至 API 級別 24。 |
參數
資料類型 | 元素的資料類型 |
---|---|
資料種類 | 元素的資料類型 |
建立指定資料類型與資料類型的 rs_element 物件。元素的 vector_width 會設為 1,表示非向量。
rsCreateType :使用指定元素和形狀屬性建立 rs_type 物件
rs_type rsCreateType(rs_element 元素、uint32_t lightX); | 已新增至 API 級別 24。 |
rs_type rsCreateType(rs_element 元素、uint32_t lightX、uint32_t放明 Y); | 已新增至 API 級別 24。 |
rs_type rsCreateType(rs_element 元素、uint32_t lightX、uint32_t維度、uint32_t進行審查 Z); | 已新增至 API 級別 24。 |
rs_type rsCreateType(rs_element 元素、uint32_t transformX、uint32_t然後調暗、uint32_t調暗 Z、bool mipmaps、布林值臉孔、rs_yuv_format yuv_format); | 已新增至 API 級別 24。 |
參數
元素 | 要與「類型」建立關聯的元素 |
---|---|
調暗 X | 按 X 尺寸決定尺寸 |
調暗 | 沿著 Y 維度調整大小 |
暗 Z | 沿著 Z 維度調整大小 |
mipmap | 此標記可註明類型是否具有 mipmap 鏈結 |
臉孔 | 此標記可註明類型是否為立方體 |
yuv_格式 | Type 適用的 YUV 版面配置 |
以指定元素和形狀屬性建立 rs_type 物件。
microX 會指定 X 尺寸的大小。
MinY (如果有顯示且非零) 表示有 Y 維度,並表示其大小。
Dr.
mipmaps 表示具有詳細資料的等級 (LOD)。
臉孔會指出立體地圖是否存在。
yuv_format 表示相關的 YUV 格式 (或 RS_YUV_NONE)。
rsCreateVectorElement :建立指定資料類型和向量寬度的 rs_element 物件
rs_element rsCreateVectorElement(rs_data_type 資料類型, uint32_t vector_width); | 已新增至 API 級別 24。 |
參數
資料類型 | 元素的資料類型 |
---|---|
向量寬度 | 向量寬度 (2、3 或 4) |
建立指定資料類型和向量寬度的 rs_element 物件。 vector_width 的值必須為 2、3 或 4。元素的資料類型會設為 RS_KIND_USER。