Panda3D

Loading...
Searching...
No Matches
colorSpace.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file colorSpace.h
10 * @author rdb
11 * @date 2014-06-02
12 */
13
14#ifndef COLORSPACE_H
15#define COLORSPACE_H
16
17#include "pandabase.h"
18
19#include "typedef.h"
20
21BEGIN_PUBLISH
22
23 enum ColorSpace {
24 // This value is not a color space, but is used to indicate that a color
25 // space has not been specified.
26 CS_unspecified = 0,
27
28 // CS_linear is not a color space per se, but represents the working color
29 // space of graphics APIs, which is linearized. Since the conversion from
30 // sRGB to linear is defined, one could posit that it has the ITU-R BT.709
31 // primaries, but this isn't meaningful as modern graphics APIs do not
32 // perform color management. All colors in Panda3D are linear unless
33 // otherwise specified.
34 CS_linear,
35
36 // This is the standard, gamma-2.2-corrected sRGB color space, as used by
37 // the majority of image formats.
38 CS_sRGB,
39
40 // This is a 16-bit encoded linear color space capable of encoding color
41 // values in the -0.5...7.4999 range.
42 CS_scRGB,
43};
44
45EXPCL_PANDA_PUTIL ColorSpace parse_color_space_string(const std::string &str);
46EXPCL_PANDA_PUTIL std::string format_color_space(ColorSpace cs);
47
48END_PUBLISH
49
50EXPCL_PANDA_PUTIL std::ostream &operator << (std::ostream &out, ColorSpace cs);
51EXPCL_PANDA_PUTIL std::istream &operator >> (std::istream &in, ColorSpace &cs);
52
53#endif
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
typedef.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.