22 #ifndef FIFE_VIDEO_RENDERBACKENDS_OPENGL_GLIMAGE_H
23 #define FIFE_VIDEO_RENDERBACKENDS_OPENGL_GLIMAGE_H
32 #include <SDL_video.h>
58 GLImage(
const std::string& name, SDL_Surface* surface);
virtual void invalidate()
Invalidates the Image causing it to be reset or re-loaded.
void generateGLTexture()
Generates the GL Texture for use when rendering.
virtual void setSurface(SDL_Surface *surface)
This frees the current suface and replaces it with the surface passed in the parameter (which can be ...
void setCompressed(bool compressed)
void resetGlimage()
Resets GLImage variables.
GLImage(IResourceLoader *loader=0)
const GLfloat * getTexCoords() const
virtual void copySubimage(uint32_t xoffset, uint32_t yoffset, const ImagePtr &img)
Copies given image into this one with respect to given offsets.
virtual void useSharedImage(const ImagePtr &shared, const Rect ®ion)
After this call all image data will be taken from the given image and its subregion.
GLuint m_texId
Holds texture ids that are used to access textures in GL rendering context.
void generateGLSharedTexture(const GLImage *shared, const Rect ®ion)
bool isCompressed() const
virtual void forceLoadInternal()
Forces to load the image into internal memory of GPU.
void cleanup()
Frees allocated memory and calls resetGlImage.
Implements an Image using OpenGL.
virtual void render(const Rect &rect, uint8_t alpha=255, uint8_t const *rgb=0)
Renders itself to the current render target (main screen or attached destination image) at the rectan...