Пример #1
0
int	draw_window(window_info *win)
{
	int	ret_val=0;

	if(win == NULL || win->window_id < 0)	return -1;

	if(!win->displayed)	return 0;
	// mouse over processing first
	elwin_mouse= mouseover_window(win->window_id, mouse_x, mouse_y);
	// now normal display processing
	glPushMatrix();
	glTranslatef((float)win->cur_x, (float)win->cur_y, 0.0f);

	draw_window_title(win);
	draw_window_border(win);
	glColor3f(1.0f, 1.0f, 1.0f);

	if(win->display_handler)
		{
			ret_val=(*win->display_handler)(win);
		}
	else
		{
			ret_val=1;
		}
	glPopMatrix();
	
	return(ret_val);
}
Пример #2
0
void draw_startup(void) {
	glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
	glLoadIdentity();

	glTranslatef(-ARENA_WIDTH * 0.5f, -ARENA_HEIGHT * 0.5f, -180);

	draw_window_border();

	glFlush();
	SDK_swapbuffers();
}