ref_iface_IVDXAContext_CreateTexture2D - shekh/VirtualDub2 GitHub Wiki
VirtualDub Plugin SDK 1.2
IVDXAContext interface
Creates a 2D texture.
uint32 CreateTexture2D(uint32 width, uint32 height, uint32 mipCount, VDXAFormat format, bool wrap, const VDXAInitData2D *initData);
width | Width of texture, in pixels. |
height | Height of texture, in pixels. |
mipCount | Number of mipmaps in the texture. |
format | Format of texels in the texture.
|
wrap | True if the texture should be interpreted as repeating out to infinity beyond its borders (wrap addressing); false if the borders should be extended (clamp addressing). |
initData | Pointer to array of initialization data structures to initialize the texture. One element is required per mipmap. The first structure corresponds to the largest mipmap and each successive structure points to an image that is half the width and height, rounding down. |
This method is not thread-safe.
A handle for the texture, or zero on failure.
This method is expensive and should be called in startProc
, not in
accelRunProc
.
The allocated texture may be larger than requested to satisfy hardware restrictions. When this occurs, the texture image is extended to fill the remaining area to satisfy clamp semantics. For this reason, wrapping should be requested only when the texture dimensions are powers of two.
Copyright (C) 2007-2012 Avery Lee.