From 30aef86ff13a43c3e0c0ecee2c0de10461fc3c9b Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Wed, 20 Jun 2007 15:32:25 +0000 Subject: Set GL texture index to zero when an image uses the SDL backend (fix by Guillaume Melquiond from trunk version) --- src/resources/image.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/resources/image.cpp') diff --git a/src/resources/image.cpp b/src/resources/image.cpp index 31e38d6d..2d5cbe82 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -32,7 +32,11 @@ bool Image::mUseOpenGL = false; #endif Image::Image(const std::string &idPath, SDL_Surface *image): - Resource(idPath), mImage(image), + Resource(idPath), +#ifdef USE_OPENGL + mGLImage(0), +#endif + mImage(image), mAlpha(1.0f) { mBounds.x = 0; -- cgit v1.2.3-60-g2f50