Mercator
Surface.h
1 // This file may be redistributed and modified only under the terms of
2 // the GNU General Public License (See COPYING for details).
3 // Copyright (C) 2003 Alistair Riddoch
4 
5 #ifndef MERCATOR_SURFACE_H
6 #define MERCATOR_SURFACE_H
7 
8 #include <Mercator/Buffer.h>
9 
10 #include <climits>
11 
12 namespace Mercator {
13 
14 class Shader;
15 
16 typedef unsigned char ColorT;
17 
18 static const ColorT colorMax = UCHAR_MAX;
19 static const ColorT colorMin = 0;
20 
22 class Surface : public Buffer<ColorT> {
23  public:
25  const Shader & m_shader;
26 
27  explicit Surface(const Segment & segment, const Shader & shader,
28  bool colors = true, bool alpha = true);
29  virtual ~Surface();
30 
31  void populate();
32  // Do we need an accessor presenting the array in colour form?
33 };
34 
35 } // namespace Mercator
36 
37 #endif // MERCATOR_SURFACE_H