Exemplo n.º 1
0
void init()
{
    glShadeModel(GL_SMOOTH);	

	glEnable(GL_LINE_SMOOTH);
	glBlendFunc(GL_SRC_ALPHA, GL_ONE);
	glHint (GL_LINE_SMOOTH_HINT, GL_NICEST);

    glClearColor(0.0, 0.0, 0.0, 0.5);	

    glClearDepth(1.0);									
    glEnable(GL_DEPTH_TEST);	
	
    glDepthFunc(GL_LEQUAL);								
    glEnable(GL_COLOR_MATERIAL);  
    
    glEnable(GL_LIGHTING);
	glEnable(GL_LIGHT0);
    glEnable(GL_LIGHT1);

    w.cam->SetPosition(0.0, 0, -70,  0, 0, 0,  0, 1, 0);

	buildLists();	
    buildBeams();
	buildFog();
    
    Cube jackpot;
    jackpot.SetBuffers(1, 1, 1);
    jackpot.SetPos(0, -1, 80);
    jackpots.push_back(jackpot);
}
Exemplo n.º 2
0
void buildBeams()
{
    //5 right, offset by 10
    for (int i = 0; i <= 1; i++)
    {
        Cube beam;
        beam.SetPos(-14, -1.0, -60 + (i * 25));
        beamsRight.push_back(beam);
    }
    
    Cube beam;
    beam.SetPos(-14, -1.0, 0.0);
    beamsRight.push_back(beam);
    
    for (int i = 3; i <= 4; i++)
    {
        Cube beam;
        beam.SetPos(-14, -1.0, -40 + (i * 25));
        beamsRight.push_back(beam);
    }

    
    //4 left
    for (int i = 0; i <= 1; i++)
    {
        Cube beam;
        beam.SetPos(14, -1.0, -50 + (i * 25));
        beamsLeft.push_back(beam);
    }
    for (int i = 3; i <= 4; i++)
    {
        Cube beam;
        beam.SetPos(14, -1.0, -50 + (i * 25));
        beamsLeft.push_back(beam);
    }
}