22 #ifndef FIFE_VIDEO_RENDERBACKENDS_OPENGL_GLEIMAGE_H
23 #define FIFE_VIDEO_RENDERBACKENDS_OPENGL_GLEIMAGE_H
29 #include "util/base/fife_stdint.h"
32 #include <SDL_video.h>
38 #include "video/image.h"
39 #include "video/opengl/fife_opengl.h"
55 GLeImage(IResourceLoader* loader = 0);
56 GLeImage(
const std::string& name, IResourceLoader* loader = 0);
58 GLeImage(
const std::string& name, SDL_Surface* surface);
59 GLeImage(
const uint8_t* data, uint32_t width, uint32_t height);
60 GLeImage(
const std::string& name,
const uint8_t* data, uint32_t width, uint32_t height);
65 virtual void render(
const Rect& rect, uint8_t alpha = 255, uint8_t
const* rgb = 0);
66 virtual void renderZ(
const Rect& rect,
float vertexZ, uint8_t alpha = 255,
bool forceNewBatch =
false, uint8_t
const* rgb = 0);
73 GLuint getTexId()
const;
74 const GLfloat* getTexCoords()
const;
75 bool isCompressed()
const {
return m_compressed; }
76 void setCompressed(
bool compressed) { m_compressed = compressed; }
79 GLfloat m_tex_coords[4];
111 void generateGLTexture();
112 void generateGLSharedTexture(
const GLeImage* shared,
const Rect& region);
113 void validateShared();
115 inline bool renderCheck(
const Rect& rect, uint8_t alpha);
117 uint32_t m_chunk_size_w;
118 uint32_t m_chunk_size_h;
120 SDL_Color m_colorkey;
126 std::string m_atlas_name;
virtual void setSurface(SDL_Surface *surface)
virtual void useSharedImage(const ImagePtr &shared, const Rect ®ion)
virtual void copySubimage(uint32_t xoffset, uint32_t yoffset, const ImagePtr &img)
virtual void forceLoadInternal()
virtual void render(const Rect &rect, uint8_t alpha=255, uint8_t const *rgb=0)
virtual void invalidate()