aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu/frame_background_color.cpp
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2010-05-09 19:17:52 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-05 17:17:48 +0100
commit1d595f048c9e59bbff14217e2fe3821ee3e1aaa1 (patch)
treefe92fea4e73324bd3645afb52c681d103624b853 /src/menu/frame_background_color.cpp
parent3ca6e32a9ecaa8514b9a30711cec20cf80722c23 (diff)
downloadusdx-1d595f048c9e59bbff14217e2fe3821ee3e1aaa1.tar.gz
usdx-1d595f048c9e59bbff14217e2fe3821ee3e1aaa1.tar.xz
usdx-1d595f048c9e59bbff14217e2fe3821ee3e1aaa1.zip
changed from SDL rendering to OpenGL
draw, repaint methods do not have the SDL_Surface* parameter anymore
Diffstat (limited to '')
-rw-r--r--src/menu/frame_background_color.cpp13
1 files changed, 11 insertions, 2 deletions
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 <GL/gl.h>
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);
+ }
};