Small OpenGL based c++ rendering library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

color.h 576B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef __COLOR_H
  2. #define __COLOR_H
  3. #include <SDL.h>
  4. #include <SDL_opengl.h>
  5. #include <iostream>
  6. #include <string>
  7. namespace segl {
  8. class Color {
  9. public:
  10. float r, g, b, a;
  11. bool setalpha;
  12. Color();
  13. Color(float _r, float _g, float _b, float _a=1.0f);
  14. Color(const SDL_Color&);
  15. void set(float _r, float _g, float _b, float _a=1.0f);
  16. SDL_Color getSDLColor();
  17. void print(std::string m="");
  18. };
  19. } // namespace segl
  20. void glColorGLC(segl::Color c);
  21. // a) setalpha entscheiden lassen
  22. // b) zwei funktionen, eine setzt alpha mit in richtung 3f, 4f..
  23. #endif