blob: f7f5e50bcf50970596d2e7543d4493c965ba2421 [file] [log] [blame]
Geoff Lang49be2ad2014-02-28 13:05:51 -05001//
Stuart Morgan9d737962019-08-14 12:25:12 -07002// Copyright 2014 The ANGLE Project Authors. All rights reserved.
Geoff Lang49be2ad2014-02-28 13:05:51 -05003// 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
Geoff Lang49be2ad2014-02-28 13:05:51 -050010#include <array>
Mohan Maiyacbbfde62020-05-22 09:08:06 -070011#include <string>
Geoff Lang49be2ad2014-02-28 13:05:51 -050012#include <vector>
13
Jamie Madillba319ba2018-12-29 10:29:33 -050014#include "util/gles_loader_autogen.h"
Corentin Wallezcf9dfa42015-05-04 13:55:41 -040015
Geoff Lang49be2ad2014-02-28 13:05:51 -050016typedef std::array<unsigned char, 4> Byte4;
17
18struct TGAImage
19{
20 size_t width;
21 size_t height;
22 std::vector<Byte4> data;
23
24 TGAImage();
25};
26
27bool LoadTGAImageFromFile(const std::string &path, TGAImage *image);
28GLuint LoadTextureFromTGAImage(const TGAImage &image);
29
Jamie Madillba319ba2018-12-29 10:29:33 -050030#endif // SAMPLE_UTIL_TGA_UTILS_HPP