aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu/frame_background_color.cpp
diff options
context:
space:
mode:
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);
+ }
};