Source/ThunderBeast/QuakeToonProto1/linux/rw_x11.c
void SWimp_EndFrame (void)
{
// if the window changes dimension, skip this frame
#if 0
	if (config_notify)
	{
		fprintf(stderr, "config notify\n");
		config_notify = 0;
		vid.width = config_notify_width & ~7;
		vid.height = config_notify_height;
		if (doShm)
			ResetSharedFrameBuffers();
		else
			ResetFrameBuffer();
		vid.rowbytes = x_framebuffer[0]->bytes_per_line;
		vid.buffer = x_framebuffer[current_framebuffer]->data;
		vid.recalc_refdef = 1;				// force a surface cache flush
		Con_CheckResize();
		Con_Clear_f();
		return;
	}
#endif

	if (doShm)
	{
		if (x_visinfo->depth == 16)
			st2_fixup( x_framebuffer[current_framebuffer], 0, 0, vid.width, vid.height);
		else if (x_visinfo->depth == 24)
			st3_fixup( x_framebuffer[current_framebuffer], 0, 0, vid.width, vid.height);
		if (!XShmPutImage(dpy, win, x_gc,
			x_framebuffer[current_framebuffer], 0, 0, 0, 0, vid.width, vid.height, True))
			Sys_Error("VID_Update: XShmPutImage failed\n");
		oktodraw = false;
		while (!oktodraw) 
			HandleEvents();
		current_framebuffer = !current_framebuffer;
		vid.buffer = x_framebuffer[current_framebuffer]->data;
		XSync(dpy, False);
	}
	else
	{
		if (x_visinfo->depth == 16)
			st2_fixup( x_framebuffer[current_framebuffer], 0, 0, vid.width, vid.height);
		else if (x_visinfo->depth == 24)
			st3_fixup( x_framebuffer[current_framebuffer], 0, 0, vid.width, vid.height);
		XPutImage(dpy, win, x_gc, x_framebuffer[0], 0, 0, 0, 0, vid.width, vid.height);
		XSync(dpy, False);
	}
}
/*
** SWimp_EndFrame
**
** This does an implementation specific copy from the backbuffer to the
** front buffer.  In the Win32 case it uses BitBlt or BltFast depending
** on whether we're using DIB sections/GDI or DDRAW.
*/
SWimp_EndFrame
This does an implementation specific copy from the backbuffer to the
front buffer.  In the Win32 case it uses BitBlt or BltFast depending
on whether we're using DIB sections/GDI or DDRAW.
SWimp_EndFrame This does an implementation specific copy from the backbuffer to the front buffer . In the Win32 case it uses BitBlt or BltFast depending on whether we ' re using DIB sections / GDI or DDRAW .
void SWimp_EndFrame (void)
{
#if 0
	if (config_notify)
	{
		fprintf(stderr, "config notify\n");
		config_notify = 0;
		vid.width = config_notify_width & ~7;
		vid.height = config_notify_height;
		if (doShm)
			ResetSharedFrameBuffers();
		else
			ResetFrameBuffer();
		vid.rowbytes = x_framebuffer[0]->bytes_per_line;
		vid.buffer = x_framebuffer[current_framebuffer]->data;
		vid.recalc_refdef = 1;				
		Con_CheckResize();
		Con_Clear_f();
		return;
	}
#endif
	if (doShm)
	{
		if (x_visinfo->depth == 16)
			st2_fixup( x_framebuffer[current_framebuffer], 0, 0, vid.width, vid.height);
		else if (x_visinfo->depth == 24)
			st3_fixup( x_framebuffer[current_framebuffer], 0, 0, vid.width, vid.height);
		if (!XShmPutImage(dpy, win, x_gc,
			x_framebuffer[current_framebuffer], 0, 0, 0, 0, vid.width, vid.height, True))
			Sys_Error("VID_Update: XShmPutImage failed\n");
		oktodraw = false;
		while (!oktodraw) 
			HandleEvents();
		current_framebuffer = !current_framebuffer;
		vid.buffer = x_framebuffer[current_framebuffer]->data;
		XSync(dpy, False);
	}
	else
	{
		if (x_visinfo->depth == 16)
			st2_fixup( x_framebuffer[current_framebuffer], 0, 0, vid.width, vid.height);
		else if (x_visinfo->depth == 24)
			st3_fixup( x_framebuffer[current_framebuffer], 0, 0, vid.width, vid.height);
		XPutImage(dpy, win, x_gc, x_framebuffer[0], 0, 0, 0, 0, vid.width, vid.height);
		XSync(dpy, False);
	}
}
void SWimp_EndFrame ( void ) { #if 0 if ( config_notify ) { fprintf ( stderr , " \n " ) ; config_notify = 0 ; vid . width = config_notify_width & ~ 7 ; vid . height = config_notify_height ; if ( doShm ) ResetSharedFrameBuffers ( ) ; else ResetFrameBuffer ( ) ; vid . rowbytes = x_framebuffer [ 0 ] -> bytes_per_line ; vid . buffer = x_framebuffer [ current_framebuffer ] -> data ; vid . recalc_refdef = 1 ; Con_CheckResize ( ) ; Con_Clear_f ( ) ; return ; } #endif if ( doShm ) { if ( x_visinfo -> depth == 16 ) st2_fixup ( x_framebuffer [ current_framebuffer ] , 0 , 0 , vid . width , vid . height ) ; else if ( x_visinfo -> depth == 24 ) st3_fixup ( x_framebuffer [ current_framebuffer ] , 0 , 0 , vid . width , vid . height ) ; if ( ! XShmPutImage ( dpy , win , x_gc , x_framebuffer [ current_framebuffer ] , 0 , 0 , 0 , 0 , vid . width , vid . height , True ) ) Sys_Error ( " \n " ) ; oktodraw = false ; while ( ! oktodraw ) HandleEvents ( ) ; current_framebuffer = ! current_framebuffer ; vid . buffer = x_framebuffer [ current_framebuffer ] -> data ; XSync ( dpy , False ) ; } else { if ( x_visinfo -> depth == 16 ) st2_fixup ( x_framebuffer [ current_framebuffer ] , 0 , 0 , vid . width , vid . height ) ; else if ( x_visinfo -> depth == 24 ) st3_fixup ( x_framebuffer [ current_framebuffer ] , 0 , 0 , vid . width , vid . height ) ; XPutImage ( dpy , win , x_gc , x_framebuffer [ 0 ] , 0 , 0 , 0 , 0 , vid . width , vid . height ) ; XSync ( dpy , False ) ; } }
SWimp_EndFrame
This does an implementation specific copy from the backbuffer to the
front buffer.
SWimp_EndFrame This does an implementation specific copy from the backbuffer to the front buffer .
// if the window changes dimension, skip this frame // force a surface cache flush