52 #include "SDL/SDL_image.h"
64 static std::map< std::string, ImageData * >
RESOURCES;
74 static void newGLContext();
87 static void release();
152 unsigned char getPixelAt(
int x,
int y )
const;
163 mutable GLuint _texture;
192 void bind()
const { _data->bind(); }
226 MENGE_API Image *
loadImage(
const std::string & fileName );
229 #endif // __IMAGE_H__
void bind() const
Binds the image to use as a texture in OpenGL.
Definition: image.h:192
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
int getHeight() const
Returns the height of the image (in pixels).
Definition: image.h:111
int getHeight() const
Returns the height of the image (in pixels).
Definition: image.h:213
Sets up the proper compiler directives for platform and dll export/import.
static bool IS_REGISTERED
Determines if the ImageData::newGLContext has been registered.
Definition: image.h:69
The interface for handling resources from a disk system.
int getWidth() const
Returns the width of the image (in pixels).
Definition: image.h:104
const ImageData * data() const
Returns the image data.
Definition: image.h:199
int getWidth() const
Returns the width of the image (in pixels).
Definition: image.h:206
A wrapper for managed data - automatically handles referencing and deletion of managed data...
Definition: ManagedData.h:127
The interface for managed data (essentially smart poitners).
Definition: ManagedData.h:61
Image * loadImage(const std::string &fileName)
Given a filename, returns a pointer to an Image with that data.
Definition: image.cpp:217
static std::map< std::string, ImageData * > RESOURCES
Mapping from image resources to its corresponding data.
Definition: image.h:64
ImageData * readImageData(const std::string &fileName)
Definition: image.cpp:84
Manged image data (see ManagedData).
Definition: image.h:59
Various important pre-compiler directives for the scene graph.
Wrapper for the managed ImageData.
Definition: image.h:175