HGE::Texture_Create

Creates an empty texture.

HTEXTURE Texture_Create(
  int width,
  int height
);

Parameters

width
Width of the texture to be created.
height
Height of the texture to be created.

Return value

If successful, returns the texture handle. Otherwise returns 0.

Remarks

The texture dimensions must be a power of 2. If this condition isn't met, the texture is automatically padded to the closest power of 2 dimensions, bigger than the requested size.

You could use Texture_Lock and Texture_Unlock functions to fill the empty texture with some data.

When the texture isn't needed longer, you must delete it with Texture_Free function.

Requirements

Header: hge.h
Import library: hge.lib

See also

Texture_Load, Texture_Free, Texture_Lock, Texture_Unlock