Esempio n. 1
0
void OGL_LoadScreen::Clear()
{
	OGL_ClearScreen();
	OGL_SwapBuffers();
	OGL_ClearScreen();

	use = false;
	useProgress = false;
	path.clear();
	image.Clear();
	blitter.Unload();
}
Esempio n. 2
0
void OGL_LoadScreen::Progress(const int progress)
{
	OGL_ClearScreen();
	OGL_Blitter::BoundScreen(true);
	
	blitter.Draw(m_dst);

	if (useProgress) 
	{
		glMatrixMode(GL_MODELVIEW);
		glPushMatrix();
		glTranslated(x_offset, y_offset, 0.0);
		glScaled(x_scale, y_scale, 1.0);
		
		// draw the progress bar background
		glColor3us(colors[0].red, colors[0].green, colors[0].blue);
		OGL_RenderRect(x, y, w, h);
		
		int height = h, width = w;
		int left = x, top = y;
		if (height > width) 
		{
			top = top + height - height * progress / 100;
			height = height * progress / 100;
		}
		else 
		{
			width = width * progress / 100;
		}
			
		// draw the progress bar foreground
		glColor3us(colors[1].red, colors[1].green, colors[1].blue);
		OGL_RenderRect(left, top, width, height);
		
		glPopMatrix();
	}
	
	OGL_SwapBuffers();
	
}
Esempio n. 3
0
void OGL_LoadScreen::Stop()
{
	OGL_ClearScreen();
	OGL_SwapBuffers();
	Clear();
}
Esempio n. 4
0
void redraw_scene() {
	glClearColor(.1, .2, .4, x ? .9 : .93);
	x = !x;
	glClear(GL_COLOR_BUFFER_BIT);
	OGL_SwapBuffers();
}