xref: /aosp_15_r20/external/angle/samples/sample_util/tga_utils.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 //
2 // Copyright 2014 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 
7 #ifndef SAMPLE_UTIL_TGA_UTILS_HPP
8 #define SAMPLE_UTIL_TGA_UTILS_HPP
9 
10 #include <array>
11 #include <string>
12 #include <vector>
13 
14 #include "util/gles_loader_autogen.h"
15 
16 typedef std::array<unsigned char, 4> Byte4;
17 
18 struct TGAImage
19 {
20     size_t width;
21     size_t height;
22     std::vector<Byte4> data;
23 
24     TGAImage();
25 };
26 
27 bool LoadTGAImageFromFile(const std::string &path, TGAImage *image);
28 GLuint LoadTextureFromTGAImage(const TGAImage &image);
29 
30 #endif  // SAMPLE_UTIL_TGA_UTILS_HPP
31