Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/libktx/lib/memstream.h
9903 views
1
/* -*- tab-width: 4; -*- */
2
/* vi: set sw=2 ts=4 expandtab: */
3
4
/*
5
* Copyright 2010-2020 The Khronos Group Inc.
6
* SPDX-License-Identifier: Apache-2.0
7
*/
8
9
/**
10
* @internal
11
* @file
12
* @~English
13
*
14
* @brief Interface of ktxStream for memory.
15
*
16
* @author Maksim Kolesin
17
* @author Georg Kolling, Imagination Technology
18
* @author Mark Callow, HI Corporation
19
*/
20
21
#ifndef MEMSTREAM_H
22
#define MEMSTREAM_H
23
24
#include "ktx.h"
25
26
/*
27
* Initialize a ktxStream to a ktxMemStream with internally
28
* allocated memory. Can be read or written.
29
*/
30
KTX_error_code ktxMemStream_construct(ktxStream* str,
31
ktx_bool_t freeOnDestruct);
32
/*
33
* Initialize a ktxStream to a read-only ktxMemStream reading
34
* from an array of bytes.
35
*/
36
KTX_error_code ktxMemStream_construct_ro(ktxStream* str,
37
const ktx_uint8_t* pBytes,
38
const ktx_size_t size);
39
void ktxMemStream_destruct(ktxStream* str);
40
41
KTX_error_code ktxMemStream_getdata(ktxStream* str, ktx_uint8_t** ppBytes);
42
43
#endif /* MEMSTREAM_H */
44
45