36#include <SDL_opengl.h>
48 friend class OpenGLGraphics;
138 static void setLoadAsOpenGL(
bool useOpenGL);
140 static bool getLoadAsOpenGL() {
return mUseOpenGL; }
142 int getTextureWidth()
const {
return mTexWidth; }
143 int getTextureHeight()
const {
return mTexHeight; }
144 static int getTextureType() {
return mTextureType; }
161 Image(SDL_Texture *texture,
int width,
int height);
180 Image(GLuint glimage,
int width,
int height,
181 int texWidth,
int texHeight);
186 static int powerOfTwo(
int input);
188 static Image *_GLload(SDL_Surface *image);
191 int mTexWidth, mTexHeight;
193 static bool mUseOpenGL;
194 static bool mPowerOfTwoTextures;
195 static int mTextureType;
196 static int mTextureSize;
207 int x,
int y,
int width,
int height);
210 int width,
int height,
int texWidth,
int textHeight);
Class for dispatching pixel-recoloring amongst several palettes.
Defines a class for loading and storing images.
int getHeight() const
Returns the height of the image.
static Image * _SDLload(SDL_Surface *tmpImage)
SDL_Surface to SDL_Texture Image loader.
int getWidth() const
Returns the width of the image.
static bool SDLisTransparencyDisabled()
static Resource * load(SDL_RWops *rw)
Loads an image from an SDL_RWops structure.
static void SDLdisableTransparency()
Disable the transparency handling (for low CPUs in SDL Mode)
static bool useOpenGL()
Tells if the system is using OpenGL or SDL.
Image * getSubImage(int x, int y, int width, int height)
Creates a new image with the desired clipping rectangle.
static bool mDisableTransparency
Stores whether the transparency is disabled.
void setAlpha(float alpha)
Sets the alpha value of this image.
float getAlpha() const
Returns the alpha value of this image.
static void setRenderer(SDL_Renderer *renderer)
static SDL_Renderer * mRenderer
Automatically counting Resource reference.
A generic reference counted resource object.
A clipped version of a larger image.
ResourceRef< Image > mParent