24 #ifndef RESOURCES_SAFEOPENGLIMAGEHELPER_H
25 #define RESOURCES_SAFEOPENGLIMAGEHELPER_H
29 #if defined(USE_OPENGL) && !defined(ANDROID) && !defined(__SWITCH__)
31 #ifndef GL_TEXTURE_RECTANGLE_ARB
32 #define GL_TEXTURE_RECTANGLE_ARB 0x84F5
33 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
40 #define GL_RGBA8 GL_RGBA8_OES
43 #define GL_GLEXT_PROTOTYPES 1
49 PRAGMA48(GCC diagnostic ignored
"-Wshadow")
52 PRAGMA45(GCC diagnostic ignored
"-Wredundant-decls")
53 #include <SDL_opengl.h>
58 PRAGMA45(GCC diagnostic ignored
"-Wredundant-decls")
106 const
int width, const
int height,
136 static void invalidate(
const GLuint textureId);
141 int height)
const override final;
146 const
int x, const
int y,
156 int width,
int height);
159 int width,
int height);
static void setBlur(const bool n)
Image * loadSurface(SDL_Surface *const tmpImage)
static void setUseTextureSampler(const bool b)
Image * glLoad(SDL_Surface *tmpImage, int width=0, int height=0)
static const size_t texturesSize
static void bindTexture(const GLuint texture)
static void invalidate(const GLuint textureId)
Image * load(SDL_RWops *const rw, Dye const &dye)
static int getInternalTextureType()
static int getTextureSize()
Image * createTextSurface(SDL_Surface *const tmpImage, const int width, const int height, const float alpha)
static bool mUseTextureSampler
GLuint mTextures[texturesSize]
void copySurfaceToImage(const Image *const image, const int x, const int y, SDL_Surface *surface) const
static SDL_Surface * convertSurfaceNormalize(SDL_Surface *tmpImage, int width, int height)
static int getTextureType()
static int powerOfTwo(const int input)
static int mInternalTextureType
SDL_Surface * create32BitSurface(int width, int height) const
static SDL_Surface * convertSurface(SDL_Surface *tmpImage, int width, int height)
static void initTextureSampler(const GLint id)
static void setInternalTextureType(const int n)
#define A_DELETE_COPY(func)
PRAGMA45(GCC diagnostic push) PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") PRAGMA45(GCC diagnostic pop) class Dye