godot/thirdparty/libktx/lib/texture.h

/* -*- tab-width: 4; -*- */
/* vi: set sw=2 ts=4 expandtab textwidth=70: */

/*
 * Copyright 2019-2020 The Khronos Group Inc.
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * @internal
 * @file texture.h
 * @~English
 *
 * @brief Declare internal ktxTexture functions for sharing between
 *        compilation units.
 *
 * These functions are private and should not be used outside the library.
 */

#ifndef _TEXTURE_H_
#define _TEXTURE_H_

#include "ktx.h"
#include "formatsize.h"

#define DECLARE_PRIVATE(class)
#define DECLARE_PROTECTED(class)

#ifdef __cplusplus
extern "C" {
#endif

ktxFormatVersionEnum;

PFNCALCDATASIZELEVELS;
PFNCALCFACELODSIZE;
PFNCALCLEVELOFFSET;
ktxTexture_vtblInt;

#define ktxTexture_calcDataSizeLevels(This, levels)
#define ktxTexture_calcFaceLodSize(This, level)
#define ktxTexture_calcLevelOffset(This, level)

/**
 * @memberof ktxTexture
 * @~English
 *
 * @brief protected members of ktxTexture.
 */
ktxTexture_protected;

#define ktxTexture_getStream(t)
#define ktxTexture1_getStream(t1)
#define ktxTexture2_getStream(t2)

KTX_error_code
ktxTexture_iterateLoadedImages(ktxTexture* This, PFNKTXITERCB iterCb,
                               void* userdata);
KTX_error_code
ktxTexture_iterateSourceImages(ktxTexture* This, PFNKTXITERCB iterCb,
                               void* userdata);

ktx_size_t ktxTexture_calcDataSizeTexture(ktxTexture* This);
ktx_size_t ktxTexture_calcImageSize(ktxTexture* This, ktx_uint32_t level,
                                    ktxFormatVersionEnum fv);
ktx_bool_t ktxTexture_isActiveStream(ktxTexture* This);
ktx_size_t ktxTexture_calcLevelSize(ktxTexture* This, ktx_uint32_t level,
                                    ktxFormatVersionEnum fv);
ktx_size_t ktxTexture_doCalcFaceLodSize(ktxTexture* This, ktx_uint32_t level,
                                        ktxFormatVersionEnum fv);
ktx_size_t ktxTexture_layerSize(ktxTexture* This, ktx_uint32_t level,
                                ktxFormatVersionEnum fv);
void ktxTexture_rowInfo(ktxTexture* This, ktx_uint32_t level,
                        ktx_uint32_t* numRows, ktx_uint32_t* rowBytes,
                        ktx_uint32_t* rowPadding);
KTX_error_code
ktxTexture_construct(ktxTexture* This, ktxTextureCreateInfo* createInfo,
                     ktxFormatSize* formatSize);

KTX_error_code
ktxTexture_constructFromStream(ktxTexture* This, ktxStream* pStream,
                               ktxTextureCreateFlags createFlags);

void
ktxTexture_destruct(ktxTexture* This);

#ifdef __cplusplus
}
#endif

#endif /* _TEXTURE_H_ */