From 1d595f048c9e59bbff14217e2fe3821ee3e1aaa1 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sun, 9 May 2010 19:17:52 +0200 Subject: changed from SDL rendering to OpenGL draw, repaint methods do not have the SDL_Surface* parameter anymore --- src/menu/frame_background_color.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/menu/frame_background_color.cpp') diff --git a/src/menu/frame_background_color.cpp b/src/menu/frame_background_color.cpp index 18483e54..43b1c748 100644 --- a/src/menu/frame_background_color.cpp +++ b/src/menu/frame_background_color.cpp @@ -25,14 +25,23 @@ */ #include "frame_background_color.hpp" +#include namespace usdx { - FrameBackgroundColor::FrameBackgroundColor(RgbColor &color) : color(color) + FrameBackgroundColor::FrameBackgroundColor(RgbColor &color) : + color(color) { } - void FrameBackgroundColor::draw(SDL_Surface* display) const + FrameBackgroundColor::FrameBackgroundColor(void) : + color(0, 0, 0) { } + + void FrameBackgroundColor::draw() + { + glClearColor(color.get_red(), color.get_green(), color.get_blue(), 1.0f); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + } }; -- cgit v1.2.3