void
EventSelect::loop(float timeStep)
{
    set_gl_options( GUI );
	drawSnow(timeStep);
    
	ppogl::UIManager::getInstance().draw(resolution);

    reshape(resolution);
}
void
Configuration::loop(float timeStep)
{
    set_gl_options( GUI );
	
	drawSnow(timeStep);

	// draw ui
	ppogl::UIManager::getInstance().draw(resolution);
    reshape(resolution);
}
Example #3
0
// Draw Particles
void drawScene( ) {
    int i, j;
    float x, y, z;
    
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glMatrixMode(GL_MODELVIEW);
    
    glLoadIdentity();
    
    
    glRotatef(pan, 0.0, 1.0, 0.0);
    glRotatef(tilt, 1.0, 0.0, 0.0);
    
    // GROUND?!
    glColor3f(r, g, b);
    glBegin(GL_QUADS);
    // along z - y const
    for (i = -10; i+1 < 11; i++) {
        // along x - y const
        for (j = -10; j+1 < 11; j++) {
            glColor3fv(ground_colors[i+10][j+10]);
            glVertex3f(ground_points[j+10][i+10][0],
                       ground_points[j+10][i+10][1], 
                       ground_points[j+10][i+10][2] + zoom);
            glColor3fv(ground_colors[i+10][j+1+10]);
            glVertex3f(ground_points[j+1+10][i+10][0], 
                       ground_points[j+1+10][i+10][1],
                       ground_points[j+1+10][i+10][2] + zoom);
            glColor3fv(ground_colors[i+1+10][j+1+10]);
            glVertex3f(ground_points[j+1+10][i+1+10][0],
                       ground_points[j+1+10][i+1+10][1],
                       ground_points[j+1+10][i+1+10][2] + zoom);
            glColor3fv(ground_colors[i+1+10][j+10]);
            glVertex3f(ground_points[j+10][i+1+10][0],
                       ground_points[j+10][i+1+10][1],
                       ground_points[j+10][i+1+10][2] + zoom);			
        }
        
    }
    glEnd();
    // Which Particles
    if (fall == RAIN) {
        drawRain();
    }else if (fall == HAIL) {
        drawHail();
    }else if (fall == SNOW) {
        drawSnow();
    }	
    
    glutSwapBuffers();
}