22 #ifndef FIFE_VIDEO_RENDERBACKENDS_OPENGL_GLEIMAGE_H
23 #define FIFE_VIDEO_RENDERBACKENDS_OPENGL_GLEIMAGE_H
32 #include <SDL_video.h>
58 GLeImage(
const std::string& name, SDL_Surface* surface);
66 virtual void renderZ(
const Rect& rect,
float vertexZ,
uint8_t alpha = 255,
bool forceNewBatch =
false,
uint8_t const* rgb = 0);
Implements an Image using experimental OpenGL.
void generateGLSharedTexture(const GLeImage *shared, const Rect ®ion)
const GLfloat * getTexCoords() const
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 cleanup()
Frees allocated memory and calls resetGlImage.
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.
GLeImage(IResourceLoader *loader=0)
virtual void copySubimage(uint32_t xoffset, uint32_t yoffset, const ImagePtr &img)
Copies given image into this one with respect to given offsets.
bool renderCheck(const Rect &rect, uint8_t alpha)
virtual void forceLoadInternal()
Forces to load the image into internal memory of GPU.
bool isCompressed() const
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...
void resetGlimage()
Resets GLeImage variables.
void generateGLTexture()
Generates the GL Texture for use when rendering.
GLuint m_texId
Holds texture ids that are used to access textures in GL rendering context.
virtual void invalidate()
Invalidates the Image causing it to be reset or re-loaded.
virtual void renderZ(const Rect &rect, float vertexZ, uint8_t alpha=255, bool forceNewBatch=false, uint8_t const *rgb=0)