Beispiel #1
0
void Holodecoder::init(int width, int height)
{
  if(!m_hasBeenInit)
  {
	initShaders(width, height);

	_initTextures(width, height);
	_initLighting();

	m_controller.init(0.5, 0.5, 0.0, 0.4f);
	m_camera.init(0.5f, 0.5f, 2.0f, 0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 0.0f);
	m_camera.setMode(1);

	//m_mesh = new TriMesh(512, 512);
	m_mesh = new TriMesh(width, height);

	m_mesh->initMesh();
	haveHoloImage = false;
	m_hasBeenInit = true;

	m_holoImages[0] = &m_holoImage0;
	m_holoImages[1] = &m_holoImage1;

	GLfloat topColor[3] = {.1882, .2941, .4667};
	GLfloat bottomColor[3] = {.1216, .2, .3373};
	m_background.setColors(topColor, bottomColor);
  }
}
Beispiel #2
0
Viewer::Viewer(const string & title, int width, int height,
	           int initPositionX, int initPositionY){
	_initGlut(title, width, height, initPositionX, initPositionY);
	_initDepth();
	_initRendering();
	_initLighting();
	_initCamera();
	_reshapeFunc(width, height);
	_setCamera();
	
	Viewer::_instance = this;
}