GemState.cpp 1.2 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
////////////////////////////////////////////////////////
//
// GEM - Graphics Environment for Multimedia
//
// zmoelnig@iem.kug.ac.at
//
// Implementation file
//
//    Copyright (c) 1997-1999 Mark Danks.
//    Copyright (c) Gnther Geiger.
//    Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::fr::umlute
//
//    For information on usage and redistribution, and for a DISCLAIMER OF ALL
//    WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution.
//
/////////////////////////////////////////////////////////

#include "GemState.h"
dheck's avatar
dheck committed
19
20
21
22
23

// I hate Microsoft...I shouldn't have to do this!
#ifdef _WINDOWS
#include <windows.h>
#endif
tigital's avatar
tigital committed
24
25
26
27

#ifdef MACOSX
#include <OpenGL/gl.h>
#else
28
#include <GL/gl.h>
tigital's avatar
tigital committed
29
#endif
30
31
32
33
34
35
36
37
38
39
40

/////////////////////////////////////////////////////////
//
// GemState
//
/////////////////////////////////////////////////////////
// Constructor
//
/////////////////////////////////////////////////////////
GemState :: GemState()
		  : dirty(0), inDisplayList(0), lighting(0), smooth(0), texture(0),
41
42
    		image(0), texCoords(0), numTexCoords(0),
		    numVertexColors(0), stereo(0), tickTime(50.f)
43
{ }
44
45
46
47
48
49

void GemState::setColor(int num)
{
  if (numVertexColors > num)
    glColor3fv(vertexColors[num]); 
}