From cc887995c0881d728e13fbdfe0757e0fa256bce0 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Wed, 17 Jul 2013 18:20:50 -0400 Subject: [PATCH] fix openGL compiling (most likely), fixes #146 --- src/PowderToySDL.cpp | 2 ++ src/graphics/OpenGLDrawMethods.inl | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp index 0f79d9e0f..cacc38d3b 100644 --- a/src/PowderToySDL.cpp +++ b/src/PowderToySDL.cpp @@ -422,6 +422,7 @@ void EngineProcess() break; #ifdef OGLI case SDL_VIDEORESIZE: + { float ratio = float(XRES+BARSIZE) / float(YRES+MENUSIZE); float width = event.resize.w; float height = width/ratio; @@ -442,6 +443,7 @@ void EngineProcess() std::cerr << "Oh bugger" << std::endl; } break; + } #endif #if defined (USE_SDL) && defined(LIN) && defined(SDL_VIDEO_DRIVER_X11) case SDL_SYSWMEVENT: diff --git a/src/graphics/OpenGLDrawMethods.inl b/src/graphics/OpenGLDrawMethods.inl index 52d09dac1..44dc70525 100644 --- a/src/graphics/OpenGLDrawMethods.inl +++ b/src/graphics/OpenGLDrawMethods.inl @@ -414,3 +414,8 @@ void PIXELMETHODS_CLASS::draw_image(pixel *img, int x, int y, int w, int h, int glBindTexture(GL_TEXTURE_2D, 0); glDisable(GL_TEXTURE_2D); } + +void PIXELMETHODS_CLASS::draw_image(VideoBuffer * vidBuf, int x, int y, int a) +{ + draw_image(vidBuf->Buffer, x, y, vidBuf->Width, vidBuf->Height, a); +}