Geoff Lang | 49be2ad | 2014-02-28 13:05:51 -0500 | [diff] [blame] | 1 | // |
| 2 | // Copyright (c) 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 <GLES2/gl2.h> |
| 11 | |
| 12 | #include <array> |
| 13 | #include <vector> |
| 14 | |
| 15 | typedef std::array<unsigned char, 4> Byte4; |
| 16 | |
| 17 | struct TGAImage |
| 18 | { |
| 19 | size_t width; |
| 20 | size_t height; |
| 21 | std::vector<Byte4> data; |
| 22 | |
| 23 | TGAImage(); |
| 24 | }; |
| 25 | |
| 26 | bool LoadTGAImageFromFile(const std::string &path, TGAImage *image); |
| 27 | GLuint LoadTextureFromTGAImage(const TGAImage &image); |
| 28 | |
| 29 | #endif // SAMPLE_UTIL_TGA_UTILS_HPP |