summaryrefslogtreecommitdiffstats
path: root/matchblox/engine/C_Environment.h
blob: cfdb8164a5666add5ecea874916cca08e6f41940 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef C_ENVIRONMENT_H

#define C_ENVIRONMENT_H

#include <GL/glut.h>

class C_Environment
{
public:
  //environment map consist of 6 bitmaps with a common
  //base name with the axis name (_positive_x.bmp, 
  //_negative_y.bmp, ...)
  //appended, the distance is the distance from the center
  //to the sides of the cube
  C_Environment(const char *f_strEnvMapBaseName,
                double f_dDistance);
  ~C_Environment();

  void Render();
  void RenderFace(double f_verts[8][3], 
                  int f_v00, int f_v10, 
                  int f_v11, int f_v01);

private:
  double m_dDist;

  //texture handles for the faces of the cube
  GLuint m_uiFaceTex[6]; //order -x, -y, -z, +x, +y, +z
};

#endif //C_ENVIRONMENT_H