2008-08-10 17:14:54 +02:00
|
|
|
#ifndef __COLOR_H
|
|
|
|
#define __COLOR_H
|
2008-02-09 13:43:23 +01:00
|
|
|
|
|
|
|
#include <SDL.h>
|
|
|
|
#include <SDL_opengl.h>
|
2008-04-14 23:37:15 +02:00
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
2008-02-09 13:43:23 +01:00
|
|
|
|
2008-08-10 17:14:54 +02:00
|
|
|
namespace segl {
|
|
|
|
|
|
|
|
class Color {
|
2008-02-09 13:43:23 +01:00
|
|
|
public:
|
|
|
|
float r, g, b, a;
|
|
|
|
bool setalpha;
|
|
|
|
|
|
|
|
|
2008-08-10 17:14:54 +02:00
|
|
|
Color();
|
|
|
|
Color(float _r, float _g, float _b, float _a=1.0f);
|
|
|
|
Color(const SDL_Color&);
|
2008-02-09 13:43:23 +01:00
|
|
|
|
|
|
|
void set(float _r, float _g, float _b, float _a=1.0f);
|
|
|
|
SDL_Color getSDLColor();
|
2008-04-14 23:37:15 +02:00
|
|
|
void print(std::string m="");
|
2008-02-09 13:43:23 +01:00
|
|
|
};
|
|
|
|
|
2008-08-10 17:14:54 +02:00
|
|
|
} // namespace segl
|
|
|
|
|
|
|
|
void glColorGLC(segl::Color c);
|
2008-02-09 13:43:23 +01:00
|
|
|
// a) setalpha entscheiden lassen
|
|
|
|
// b) zwei funktionen, eine setzt alpha mit in richtung 3f, 4f..
|
|
|
|
|
|
|
|
#endif
|