Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

55 rader
1.5 KiB

/* libsegl - Sebas Extended GL Library
* Collection of Opengl/3D-Math helpers
*
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
* http://www.seba-geek.de
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __COLOR_H
#define __COLOR_H
#include <SDL.h>
#include <SDL_opengl.h>
#include <iostream>
#include <string>
namespace segl {
class Color {
public:
float r, g, b, a;
bool setalpha;
Color();
Color(float _r, float _g, float _b, float _a=1.0f);
Color(const SDL_Color&);
void set(float _r, float _g, float _b, float _a=1.0f);
SDL_Color getSDLColor();
void print(std::string m="");
};
} // namespace segl
void glColorGLC(segl::Color c);
// a) setalpha entscheiden lassen
// b) zwei funktionen, eine setzt alpha mit in richtung 3f, 4f..
#endif