Partager via


Effect.Apply(Int32, Int32, Int32, Int32) Method

Definition

Apply an effect to GL textures.

[Android.Runtime.Register("apply", "(IIII)V", "GetApply_IIIIHandler")]
public abstract void Apply (int inputTexId, int width, int height, int outputTexId);
[<Android.Runtime.Register("apply", "(IIII)V", "GetApply_IIIIHandler")>]
abstract member Apply : int * int * int * int -> unit

Parameters

inputTexId
Int32

The GL texture name of a valid and bound input texture.

width
Int32

The width of the input texture in pixels.

height
Int32

The height of the input texture in pixels.

outputTexId
Int32

The GL texture name of the output texture.

Attributes

Remarks

Apply an effect to GL textures.

Apply the Effect on the specified input GL texture, and write the result into the output GL texture. The texture names passed must be valid in the current GL context.

The input texture must be a valid texture name with the given width and height and must be bound to a GL_TEXTURE_2D texture image (usually done by calling the glTexImage2D() function). Multiple mipmap levels may be provided.

If the output texture has not been bound to a texture image, it will be automatically bound by the effect as a GL_TEXTURE_2D. It will contain one mipmap level (0), which will have the same size as the input. No other mipmap levels are defined. If the output texture was bound already, and its size does not match the input texture size, the result may be clipped or only partially fill the texture.

Note, that regardless of whether a texture image was originally provided or not, both the input and output textures are owned by the caller. That is, the caller is responsible for calling glDeleteTextures() to deallocate the input and output textures.

Java documentation for android.media.effect.Effect.apply(int, int, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to