Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
Diffstat (limited to 'src/math')
-rw-r--r--src/math/color.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/math/color.h b/src/math/color.h
index 0dd5fc8..ea6fe1c 100644
--- a/src/math/color.h
+++ b/src/math/color.h
@@ -46,6 +46,8 @@ public:
/// multiply rgb values with scalar value.
Color operator*(const float scalar) const;
+ inline float operator[](size_t index) const { return rgba_data[index]; }
+
/// pointer to the internal data
inline float *ptr() const { return (float *) rgba_data; };