From feba563611f39efe4f71cf09347d5aa9cd13ada6 Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 4 Apr 2003 15:06:29 +0000 Subject: Finished filling --- lib/texture.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/texture.cc') diff --git a/lib/texture.cc b/lib/texture.cc index 80853ca..bea33a4 100644 --- a/lib/texture.cc +++ b/lib/texture.cc @@ -39,6 +39,8 @@ mogltk::texture::texture(int w, int h, bool plane) throw (GeneralException) : wi throw GeneralException(_("Can't create RGB Surface")); } + SDL_FillRect(surface, 0, 0); + #ifdef TRACE_TEXTURES next = 0; prev = footer; @@ -154,6 +156,10 @@ SDL_Surface * mogltk::texture::GetSurface() { return surface; } +SDL_PixelFormat * mogltk::texture::GetFormat() { + return surface->format; +} + void mogltk::texture::Generate() { if (texture_allocated) { glDeleteTextures(1, &tex); -- cgit v1.2.3