Język

GLES20.GlTexImage2D Method

Definition

Defines a texture image from pixel data, or allocates it without initial data.

[Android.Runtime.Register("glTexImage2D", "(IIIIIIIILjava/nio/Buffer;)V", "")]
public static void GlTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, Java.Nio.Buffer? pixels);
[<Android.Runtime.Register("glTexImage2D", "(IIIIIIIILjava/nio/Buffer;)V", "")>]
static member GlTexImage2D : int * int * int * int * int * int * int * int * Java.Nio.Buffer -> unit

Parameters

target
Int32

GL_TEXTURE_2D or one of the six GL_TEXTURE_CUBE_MAP face tokens.

level
Int32

The nonnegative mipmap level; zero is the base image.

internalformat
Int32

The internal texel format; core OpenGL ES 2.0 requires the same value as format, while OpenGL ES 3.0 and later also accept compatible sized internal formats.

width
Int32

The nonnegative image width in texels, within the supported dimension and texture-size restrictions.

height
Int32

The nonnegative image height in texels, within the supported dimension and texture-size restrictions.

border
Int32

Zero; OpenGL ES texture images have no border.

format
Int32

The supported input pixel format, matching internalformat in OpenGL ES 2.0 or compatible with a sized internalformat in OpenGL ES 3.0 and later.

type
Int32

The supported component or packed-pixel type compatible with format.

pixels
Buffer

A direct or accessible array-backed input buffer at its current position, or null to allocate undefined image contents. For non-null input, supply the complete image including GL_UNPACK_ALIGNMENT row padding; capacity is not checked. In contexts supporting pixel-unpack buffers, leave that binding zero for this client-memory overload. Supply enough data for all active pixel-store settings.

Attributes

Remarks

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