shadow-over-bishkek001/app/jni/src/TextureManager.h
2025-12-05 17:27:03 +06:00

50 lines
850 B
C++

#pragma once
//#include "OpenGlExtensions.h"
#include "Utils.h"
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
namespace ZL
{
struct TextureDataStruct
{
size_t width;
size_t height;
std::vector<char> data;
enum BitSize {
BS_24BIT,
BS_32BIT
};
BitSize bitSize;
};
class Texture
{
size_t width = 0;
size_t height = 0;
GLuint texID = 0;
public:
Texture(const TextureDataStruct& texData);
~Texture();
GLuint getTexID();
size_t getWidth();
size_t getHeight();
};
TextureDataStruct CreateTextureDataFromBmp24(const std::string& fullFileName, const std::string& ZIPFileName="");
TextureDataStruct CreateTextureDataFromBmp32(const std::string& fullFileName, const std::string& ZIPFileName="");
#ifdef PNG_ENABLED
TextureDataStruct CreateTextureDataFromPng(const std::string& fullFileName);
#endif
}