• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GLimp_Shutdown函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GLimp_Shutdown函数的典型用法代码示例。如果您正苦于以下问题:C++ GLimp_Shutdown函数的具体用法?C++ GLimp_Shutdown怎么用?C++ GLimp_Shutdown使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GLimp_Shutdown函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: RE_Shutdown

/*
===============
RE_Shutdown
===============
*/
void RE_Shutdown( qboolean destroyWindow ) {	

	ri.Printf( PRINT_ALL, "RE_Shutdown( %i )\n", destroyWindow );

	ri.Cmd_RemoveCommand ("modellist");
	ri.Cmd_RemoveCommand ("screenshotJPEG");
	ri.Cmd_RemoveCommand ("screenshot");
	ri.Cmd_RemoveCommand ("imagelist");
	ri.Cmd_RemoveCommand ("shaderlist");
	ri.Cmd_RemoveCommand ("skinlist");
	ri.Cmd_RemoveCommand ("gfxinfo");
	ri.Cmd_RemoveCommand( "modelist" );
	ri.Cmd_RemoveCommand( "shaderstate" );


	if ( tr.registered ) {
		R_SyncRenderThread();
		R_ShutdownCommandBuffers();
		R_DeleteTextures();
	}

	R_DoneFreeType();

	// shut down platform specific OpenGL stuff
	if ( destroyWindow ) {
		GLimp_Shutdown();
	}

	tr.registered = qfalse;
}
开发者ID:AlienHoboken,项目名称:Tremulous-Z-Server,代码行数:35,代码来源:tr_init.c


示例2: RE_Shutdown

void RE_Shutdown( qboolean destroyWindow ) {	
	ri.Printf( PRINT_ALL, "RE_Shutdown( %i )\n", destroyWindow );

	ri.Cmd_RemoveCommand ("imagelist");
	ri.Cmd_RemoveCommand ("shaderlist");
	ri.Cmd_RemoveCommand ("skinlist");
	ri.Cmd_RemoveCommand ("modellist");
	ri.Cmd_RemoveCommand ("modelist" );
	ri.Cmd_RemoveCommand ("screenshot");
	ri.Cmd_RemoveCommand ("screenshot_tga");	
	ri.Cmd_RemoveCommand ("gfxinfo");
	ri.Cmd_RemoveCommand ("r_fogDistance");
	ri.Cmd_RemoveCommand ("r_fogColor");
	ri.Cmd_RemoveCommand ("modelcacheinfo");
	ri.Cmd_RemoveCommand ("imagecacheinfo");

	R_ShutdownWorldEffects();
	R_ShutdownFonts();

	if ( tr.registered ) {
		R_SyncRenderThread();
		R_ShutdownCommandBuffers();
		if (destroyWindow)
		{
			R_DeleteTextures();	// only do this for vid_restart now, not during things like map load
		}
	}

	// shut down platform specific OpenGL stuff
	if ( destroyWindow ) {
		GLimp_Shutdown();
	}
	tr.registered = qfalse;
}
开发者ID:Ced2911,项目名称:massive-tyrion,代码行数:34,代码来源:tr_init.cpp


示例3: RE_Shutdown

/*
===============
RE_Shutdown
===============
*/
void RE_Shutdown( qboolean destroyWindow ) {

    ri.Printf( PRINT_ALL, "RE_Shutdown( %i )\n", destroyWindow );

    ri.Cmd_RemoveCommand ("modellist");
    ri.Cmd_RemoveCommand ("screenshotJPEG");
    ri.Cmd_RemoveCommand ("screenshot");
    ri.Cmd_RemoveCommand ("imagelist");
    ri.Cmd_RemoveCommand ("shaderlist");
    ri.Cmd_RemoveCommand ("skinlist");
    ri.Cmd_RemoveCommand ("gfxinfo");
    ri.Cmd_RemoveCommand("minimize");
    ri.Cmd_RemoveCommand( "modelist" );
    ri.Cmd_RemoveCommand( "shaderstate" );


    if ( tr.registered ) {
        R_IssuePendingRenderCommands();
        R_DeleteTextures();
    }

    R_DoneFreeType();

    // shut down platform specific OpenGL stuff
    if ( destroyWindow ) {
        GLimp_Shutdown();

        Com_Memset( &glConfig, 0, sizeof( glConfig ) );
        Com_Memset( &glState, 0, sizeof( glState ) );
    }

    tr.registered = qfalse;
}
开发者ID:ptitSeb,项目名称:ioq3,代码行数:38,代码来源:tr_init.c


示例4: Sys_Error

/*
=============
Sys_Error

Show the early console as an error dialog
=============
*/
void Sys_Error( const char *error, ... ) {
	va_list		argptr;
	char		text[4096];
    MSG        msg;

	va_start( argptr, error );
	vsprintf( text, error, argptr );
	va_end( argptr);

	Conbuf_AppendText( text );
	Conbuf_AppendText( "\n" );

	Win_SetErrorText( text );
	Sys_ShowConsole( 1, true );

	timeEndPeriod( 1 );

	Sys_ShutdownInput();

	GLimp_Shutdown();

	// wait for the user to quit
	while ( 1 ) {
		if ( !GetMessage( &msg, NULL, 0, 0 ) ) {
			common->Quit();
		}
		TranslateMessage( &msg );
      	DispatchMessage( &msg );
	}

	Sys_DestroyConsole();

	exit (1);
}
开发者ID:infernuslord,项目名称:uqe-doom3,代码行数:41,代码来源:win_main.cpp


示例5: RE_Shutdown

/*
===============
RE_Shutdown
===============
*/
void RE_Shutdown(qboolean destroyWindow)
{
	ri.Printf(PRINT_ALL, "RE_Shutdown( %i )\n", destroyWindow);

	ri.Cmd_RemoveCommand("modellist");
	ri.Cmd_RemoveCommand("screenshotJPEG");
	ri.Cmd_RemoveCommand("screenshot");
	ri.Cmd_RemoveCommand("imagelist");
	ri.Cmd_RemoveCommand("shaderlist");
	ri.Cmd_RemoveCommand("skinlist");
	ri.Cmd_RemoveCommand("gfxinfo");
	ri.Cmd_RemoveCommand("minimize");
	ri.Cmd_RemoveCommand("modelist");
	ri.Cmd_RemoveCommand("shaderstate");
	ri.Cmd_RemoveCommand("taginfo");

	// keep a backup of the current images if possible
	// clean out any remaining unused media from the last backup
	R_PurgeCache();

	if (r_cache->integer)
	{
		if (tr.registered)
		{
			if (destroyWindow)
			{
				R_IssuePendingRenderCommands();
				R_DeleteTextures();
			}
			else
			{
				// backup the current media
				R_BackupModels();
				R_BackupShaders();
				R_BackupImages();
			}
		}
	}
	else if (tr.registered)
	{
		R_IssuePendingRenderCommands();
		R_DeleteTextures();
	}

	R_DoneFreeType();

	// shut down platform specific OpenGL stuff
	if (destroyWindow)
	{
		GLimp_Shutdown();

		// release the virtual memory
		R_Hunk_End();
		R_FreeImageBuffer();
		ri.Tag_Free();  // wipe all render alloc'd zone memory
	}

	tr.registered = qfalse;
}
开发者ID:vishen,项目名称:etlegacy,代码行数:64,代码来源:tr_init.c


示例6: RE_Shutdown

/*
===============
RE_Shutdown
===============
*/
void RE_Shutdown( qbool destroyWindow ) {

	ST_Printf( PRINT_R_VERBOSE, "R_Shutdown( %i )\n", destroyWindow );

	// shut down platform specific OpenGL stuff
	if ( destroyWindow ) {
		GLimp_Shutdown();
	}
}
开发者ID:jite,项目名称:jquake,代码行数:14,代码来源:tr_init.c


示例7: GLimp_SetMode

/*
** GLimp_SetMode
*/
rserr_t GLimp_SetMode( int x, int y, int width, int height, int displayFrequency, 
	qboolean fullscreen, qboolean wideScreen )
{
	const char *win_fs[] = { "W", "FS" };

	// check whether we can toggle fullscreen without a vid_restart
	if( glw_state.hWnd ) {
		if( glConfig.width == width && glConfig.height == height && fullscreen != glConfig.fullScreen ) {
			glConfig.fullScreen = VID_SetFullscreenMode( displayFrequency, fullscreen );

			if( glConfig.fullScreen == fullscreen ) {
				VID_SetWindowSize( fullscreen );
				return rserr_ok;
			}

			return rserr_restart_required;
		}
	}

	ri.Com_Printf( "Initializing OpenGL display\n" );

	ri.Com_Printf( "...setting mode:" );

	// disable fullscreen if rendering to a parent window
	if( glw_state.parenthWnd ) {
		RECT parentWindowRect;

		fullscreen = qfalse;
		wideScreen = qfalse;

		GetWindowRect( glw_state.parenthWnd, &parentWindowRect );
		width = parentWindowRect.right - parentWindowRect.left;
		height = parentWindowRect.bottom - parentWindowRect.top;
	}

	ri.Com_Printf( " %d %d %s\n", width, height, win_fs[fullscreen] );

	// destroy the existing window
	if( glw_state.hWnd )
	{
		GLimp_Shutdown();
	}

	glw_state.win_x = x;
	glw_state.win_y = y;

	glConfig.width = width;
	glConfig.height = height;
	glConfig.wideScreen = wideScreen;
	glConfig.fullScreen = VID_SetFullscreenMode( displayFrequency, fullscreen );

	if( !VID_CreateWindow() ) {
		return rserr_invalid_mode;
	}

	return ( fullscreen == glConfig.fullScreen ? rserr_ok : rserr_invalid_fullscreen );
}
开发者ID:ewirch,项目名称:qfusion,代码行数:60,代码来源:win_glw.c


示例8: GLimp_SetMode

/*
** GLimp_SetMode
*/
rserr_t GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen )
{
    int width, height;
    const char *win_fs[] = { "W", "FS" };

    Com_Printf ( "Initializing OpenGL display\n");

    Com_Printf ("...setting mode %d:", mode );

    if ( !R_GetModeInfo( &width, &height, mode ) )
    {
        Com_Printf ( " invalid mode\n" );
        return rserr_invalid_mode;
    }

    Com_Printf ( " %d %d %s\n", width, height, win_fs[fullscreen] );

    // destroy the existing window
    if (glw_state.hWnd)
        GLimp_Shutdown ();

    // do a CDS if needed
    if ( fullscreen )
    {
        if (GLimp_SetFSMode(&width, &height))
        {
            *pwidth = width;
            *pheight = height;
            if (!VID_CreateWindow (width, height, true)) {
                Com_Printf("...restoring display settings\n");
                ChangeDisplaySettings( 0, 0 );
                gl_state.fullscreen = false;
                return rserr_invalid_mode;
            }

            EnumDisplaySettings (NULL, ENUM_CURRENT_SETTINGS, &fullScreenMode);

            gl_state.fullscreen = true;
            return rserr_ok;
        }
    }

    *pwidth = width;
    *pheight = height;
    Com_Printf ( "...setting windowed mode\n" );

    if (gl_state.fullscreen)
    {
        ChangeDisplaySettings( 0, 0 );
        gl_state.fullscreen = false;
    }

    if (!VID_CreateWindow (width, height, false))
        return rserr_invalid_mode;

    return (fullscreen) ? rserr_invalid_fullscreen : rserr_ok;
}
开发者ID:q3aql,项目名称:quake2,代码行数:60,代码来源:glw_imp.c


示例9: signal_handler

static void signal_handler( int sig ) {
	if ( signalcaught ) {
		printf( "DOUBLE SIGNAL FAULT: Received signal %d, exiting...\n", sig );
		Sys_Exit( 1 );
	}
	signalcaught = qtrue;
	printf( "Received signal %d, exiting...\n", sig );
	GLimp_Shutdown();
	Sys_Exit( 0 );
}
开发者ID:LBoksha,项目名称:RTCW-SP-linux,代码行数:10,代码来源:sdl_glimp.c


示例10: signal_handler

static void signal_handler(int sig) // bk010104 - replace this...
{
	if (signalcaught) {
	  printf("DOUBLE SIGNAL FAULT: Received signal %d, exiting...\n", sig);
	  Sys_Exit(1); // bk010104 - abstraction
	}

	signalcaught = qtrue;
	printf("Received signal %d, exiting...\n", sig);
	GLimp_Shutdown(); // bk010104 - shouldn't this be CL_Shutdown
	Sys_Exit(1); // bk010104 - abstraction
}
开发者ID:5Quintessential,项目名称:jedioutcast,代码行数:12,代码来源:linux_glimp.c


示例11: signal_handler

static void signal_handler(int sig) {// bk010104 - replace this... (NOTE TTimo huh?)
  if (signalcaught) {
    printf("DOUBLE SIGNAL FAULT: Received signal %d, exiting...\n", sig);
    Sys_Exit(1); // bk010104 - abstraction
  }
  signalcaught = qtrue;
  printf("Received signal %d, exiting...\n", sig);
#ifndef DEDICATED
  GLimp_Shutdown(); // bk010104 - shouldn't this be CL_Shutdown
#endif
  Sys_Exit(0); // bk010104 - abstraction NOTE TTimo send a 0 to avoid DOUBLE SIGNAL FAULT
}
开发者ID:kallisti5,项目名称:quake3,代码行数:12,代码来源:beos_main.cpp


示例12: GLimp_SetMode

/*
** GLimp_SetMode
*/
rserr_t GLimp_SetMode( int x, int y, int width, int height, int displayFrequency, bool fullscreen, bool stereo, bool borderless )
{
	const char *win_fs[] = { "W", "FS" };

	ri.Com_Printf( "Setting video mode:" );

	// disable fullscreen if rendering to a parent window
	if( glw_state.parenthWnd ) {
		RECT parentWindowRect;

		fullscreen = false;

		GetWindowRect( glw_state.parenthWnd, &parentWindowRect );
		width = parentWindowRect.right - parentWindowRect.left;
		height = parentWindowRect.bottom - parentWindowRect.top;
	}

	ri.Com_Printf( " %d %d %s\n", width, height, win_fs[fullscreen] );

	// destroy the existing window
	if( glw_state.hWnd )
	{
		GLimp_Shutdown();
	}

	glw_state.win_x = x;
	glw_state.win_y = y;

	glConfig.width = width;
	glConfig.height = height;
	glConfig.fullScreen = ( fullscreen ? GLimp_SetFullscreenMode( displayFrequency, fullscreen ) == rserr_ok : false );
	glConfig.stereoEnabled = stereo;
	glConfig.borderless = borderless;

	GLimp_CreateWindow();

	// init all the gl stuff for the window
	if( !GLimp_InitGL() ) {
		ri.Com_Printf( "GLimp_CreateWindow() - GLimp_InitGL failed\n" );
		return false;
	}

	return ( fullscreen == glConfig.fullScreen ? rserr_ok : rserr_invalid_fullscreen );
}
开发者ID:Clever-Boy,项目名称:qfusion,代码行数:47,代码来源:win_glw.c


示例13: GLimp_SetMode

/*
** GLimp_SetMode
*/
int GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen )
{
	int width, height;
	GLint attribs[32];

	ri.Con_Printf( PRINT_ALL, "Initializing OpenGL display\n");

	ri.Con_Printf (PRINT_ALL, "...setting mode %d:", mode );

	if ( !ri.Vid_GetModeInfo( &width, &height, mode ) )
	{
		ri.Con_Printf( PRINT_ALL, " invalid mode\n" );
		return rserr_invalid_mode;
	}

	ri.Con_Printf( PRINT_ALL, " %d %d\n", width, height );

	// destroy the existing window
	GLimp_Shutdown ();

	// set fx attribs
	attribs[0] = FXMESA_DOUBLEBUFFER;
	attribs[1] = FXMESA_ALPHA_SIZE;
	attribs[2] = 1;
	attribs[3] = FXMESA_DEPTH_SIZE;
	attribs[4] = 1;
	attribs[5] = FXMESA_NONE;

	fc = qfxMesaCreateContext(0, findres(&width, &height), GR_REFRESH_75Hz, 
		attribs);
	if (!fc)
		return rserr_invalid_mode;

	*pwidth = width;
	*pheight = height;

	// let the sound and input subsystems know about the new window
	ri.Vid_NewWindow (width, height);

	qfxMesaMakeCurrent(fc);

	return rserr_ok;
}
开发者ID:1vanK,项目名称:Urho3DQuake2,代码行数:46,代码来源:gl_fxmesa.c


示例14: GLimp_SetMode

/**
 * Set video mode.
 * @param mode number of the mode to set
 * @param fullscreen <code>true</code> for a fullscreen mode,
 *     <code>false</code> otherwise
 */
rserr_t GLimp_SetMode( int x, int y, int width, int height, int displayFrequency, bool fullscreen, bool stereo, bool borderless )
{
	const char *win_fs[] = {"W", "FS"};

#ifdef __APLE__
	if( fullscreen ) {
		borderless = true;
	}
	else {
		borderless = false;
	}
#endif

	ri.Com_Printf( "Initializing OpenGL display\n" );
	ri.Com_Printf( "...setting mode:" );
	ri.Com_Printf( " %d %d %s\n", width, height, win_fs[fullscreen] );

	// destroy the existing window
	if( glw_state.sdl_window ) {
		GLimp_Shutdown();
	}

	GLimp_CreateWindow( x, y, width, height );

	// init all the gl stuff for the window
	if( !GLimp_InitGL( r_stencilbits->integer, stereo ) ) {
		ri.Com_Printf( "VID_CreateWindow() - GLimp_InitGL failed\n" );
		return rserr_invalid_mode;
	}

	glConfig.width = width;
	glConfig.height = height;
	glConfig.borderless = borderless;
	glConfig.fullScreen = fullscreen;
	if( GLimp_SetFullscreenMode( displayFrequency, fullscreen ) == rserr_ok ) {
		glConfig.fullScreen = fullscreen;
	}
	else {
		glConfig.fullScreen = !fullscreen;
	}

    return glConfig.fullScreen == fullscreen ? rserr_ok : rserr_invalid_fullscreen;
}
开发者ID:Clever-Boy,项目名称:qfusion,代码行数:49,代码来源:sdl_glw.c


示例15: RE_Shutdown

/*
===============
RE_Shutdown
===============
*/
void RE_Shutdown( qboolean destroyWindow ) {	

	ri.Printf( PRINT_ALL, "RE_Shutdown( %i )\n", destroyWindow );

	ri.Cmd_RemoveCommand ("modellist");
	ri.Cmd_RemoveCommand ("screenshotJPEG");
	ri.Cmd_RemoveCommand ("screenshot");
	ri.Cmd_RemoveCommand ("imagelist");
	ri.Cmd_RemoveCommand ("shaderlist");
	ri.Cmd_RemoveCommand ("skinlist");
	ri.Cmd_RemoveCommand ("gfxinfo");
	ri.Cmd_RemoveCommand ("modelist");
	ri.Cmd_RemoveCommand ("shaderstate");
	ri.Cmd_RemoveCommand ("r_we");
	ri.Cmd_RemoveCommand ("modelcacheinfo");
	ri.Cmd_RemoveCommand ("imagecacheinfo");
#ifndef DEDICATED
	R_ShutdownFonts();
	if ( tr.registered ) {
		R_SyncRenderThread();
		R_ShutdownCommandBuffers();
		if (destroyWindow)
		{
			R_DeleteTextures();		// only do this for vid_restart now, not during things like map load
		}
	}

	// shut down platform specific OpenGL stuff
	if ( destroyWindow ) {
		GLimp_Shutdown();
	}
#endif //!DEDICATED

	tr.registered = qfalse;

#ifdef G2_COLLISION_ENABLED
	if (G2VertSpaceServer)
	{
		delete G2VertSpaceServer;
		G2VertSpaceServer = 0;
	}
#endif
}
开发者ID:5Quintessential,项目名称:jedioutcast,代码行数:48,代码来源:tr_init.cpp


示例16: RE_Shutdown

/*
===============
RE_Shutdown
===============
*/
void RE_Shutdown( qboolean destroyWindow ) {

	ri.Printf( PRINT_ALL, "RE_Shutdown( %i )\n", destroyWindow );

	ri.Cmd_RemoveCommand( "modellist" );
	ri.Cmd_RemoveCommand( "screenshotJPEG" );
	ri.Cmd_RemoveCommand( "screenshot" );
	ri.Cmd_RemoveCommand( "imagelist" );
	ri.Cmd_RemoveCommand( "shaderlist" );
	ri.Cmd_RemoveCommand( "skinlist" );
	ri.Cmd_RemoveCommand( "gfxinfo" );
	ri.Cmd_RemoveCommand("minimize");
	ri.Cmd_RemoveCommand( "modelist" );
	ri.Cmd_RemoveCommand( "shaderstate" );
	ri.Cmd_RemoveCommand( "taginfo" );

	// Ridah
	ri.Cmd_RemoveCommand( "cropimages" );
	// done.

	if ( tr.registered ) {
		R_IssuePendingRenderCommands();
		R_DeleteTextures();
	}

	R_DoneFreeType();

	// shut down platform specific OpenGL stuff
	if ( destroyWindow ) {
		GLimp_Shutdown();

		// Ridah, release the virtual memory
		R_Hunk_End();
		R_FreeImageBuffer();
		ri.Tag_Free();  // wipe all render alloc'd zone memory
	}

	tr.registered = qfalse;
}
开发者ID:MAN-AT-ARMS,项目名称:iortcw-archive,代码行数:44,代码来源:tr_init.c


示例17: GLimp_SetMode

/**
 * Set video mode.
 * @param mode number of the mode to set
 * @param fullscreen <code>true</code> for a fullscreen mode,
 *     <code>false</code> otherwise
 */
rserr_t GLimp_SetMode( int x, int y, int width, int height, int displayFrequency, bool fullscreen, bool stereo )
{
	const char *win_fs[] = {"W", "FS"};

	if( width == glConfig.width && height == glConfig.height && glConfig.fullScreen != fullscreen ) {
		if( GLimp_SetWindowFullscreen( fullscreen ) ) {
			glConfig.fullScreen = fullscreen;
			return rserr_ok;
		}
		return rserr_restart_required;
	}

	ri.Com_Printf( "Initializing OpenGL display\n" );
	ri.Com_Printf( "...setting mode:" );
	ri.Com_Printf( " %d %d %s\n", width, height, win_fs[fullscreen] );

	// destroy the existing window
	if( glw_state.sdl_window ) {
		GLimp_Shutdown();
	}

	GLimp_CreateWindow( x, y, width, height );

	// init all the gl stuff for the window
	if( !GLimp_InitGL( r_stencilbits->integer, stereo ) ) {
		ri.Com_Printf( "VID_CreateWindow() - GLimp_InitGL failed\n" );
		return rserr_invalid_mode;
	}

	if( fullscreen && !GLimp_SetWindowFullscreen( fullscreen ) ) {
		return rserr_invalid_fullscreen;
	}

	glConfig.width = width;
	glConfig.height = height;
	glConfig.fullScreen = fullscreen;
	return rserr_ok;
}
开发者ID:MGXRace,项目名称:racesow,代码行数:44,代码来源:sdl_glw.c


示例18: RE_Shutdown

/*
 * RE_Shutdown
 */
void
RE_Shutdown(qbool destroyWindow)
{

	ri.Printf(PRINT_ALL, "RE_Shutdown( %i )\n", destroyWindow);

	ri.cmdremove ("modellist");
	ri.cmdremove ("screenshotJPEG");
	ri.cmdremove ("screenshot");
	ri.cmdremove ("imagelist");
	ri.cmdremove ("shaderlist");
	ri.cmdremove ("skinlist");
	ri.cmdremove ("gfxinfo");
	ri.cmdremove("minimize");
	ri.cmdremove("modelist");
	ri.cmdremove("shaderstate");


	if(tr.registered){
		R_SyncRenderThread();
		R_ShutdownCommandBuffers();
		R_ShutDownQueries();
		R_DeleteTextures();
		R_ShutdownVBOs();
		FBO_Shutdown();
		GLSL_ShutdownGPUShaders();
	}

	R_DoneFreeType();

	/* shut down platform specific OpenGL stuff */
	if(destroyWindow){
		GLimp_Shutdown();
	}

	tr.registered = qfalse;
}
开发者ID:icanhas,项目名称:yantar,代码行数:40,代码来源:init.c


示例19: GLimp_SetMode

/*
** GLimp_SetMode
*/
int GLimp_SetMode( int mode, qboolean fullscreen )
{
	int width, height;
	const char *win_fs[] = { "W", "FS" };
	qboolean wideScreen;

	// disable fullscreen if rendering to a parent window
	if( glw_state.parenthWnd )
	{
		fullscreen = qfalse;
	}

	Com_Printf( "Initializing OpenGL display\n" );

	Com_Printf( "...setting mode %d:", mode );

	if( !VID_GetModeInfo( &width, &height, &wideScreen, mode ) )
	{
		Com_Printf( " invalid mode\n" );
		return rserr_invalid_mode;
	}

	Com_Printf( " %d %d %s\n", width, height, win_fs[fullscreen] );

	// destroy the existing window
	if( glw_state.hWnd )
	{
		GLimp_Shutdown();
	}

	glState.width = width;
	glState.height = height;
	glState.wideScreen = wideScreen;
	glState.fullScreen = fullscreen;

	// do a CDS if needed
	if( fullscreen )
	{
		DEVMODE dm;

		Com_Printf( "...attempting fullscreen\n" );

		memset( &dm, 0, sizeof( dm ) );

		dm.dmSize = sizeof( dm );

		dm.dmPelsWidth  = width;
		dm.dmPelsHeight = height;
		dm.dmFields     = DM_PELSWIDTH | DM_PELSHEIGHT;

		if( r_colorbits->integer != 0 )
		{
			dm.dmBitsPerPel = r_colorbits->integer;
			dm.dmFields |= DM_BITSPERPEL;
			Com_Printf( "...using r_bitdepth of %d\n", dm.dmBitsPerPel );
		}
		else
		{
			HDC hdc = GetDC( NULL );
			int bitspixel = GetDeviceCaps( hdc, BITSPIXEL );

			Com_Printf( "...using desktop display depth of %d\n", bitspixel );

			ReleaseDC( 0, hdc );
		}

		if( vid_displayfrequency->integer > 0 )
		{
			dm.dmFields |= DM_DISPLAYFREQUENCY;
			dm.dmDisplayFrequency = vid_displayfrequency->integer;
			Com_Printf( "...using display frequency %i\n", dm.dmDisplayFrequency );
		}

		Com_Printf( "...calling CDS: " );
		if( ChangeDisplaySettings( &dm, CDS_FULLSCREEN ) == DISP_CHANGE_SUCCESSFUL )
		{
			Com_Printf( "ok\n" );

			if( !VID_CreateWindow( &glState.width, &glState.height, qtrue ) )
				return rserr_invalid_mode;

			return rserr_ok;
		}
		else
		{
			Com_Printf( "failed\n" );

			Com_Printf( "...calling CDS assuming dual monitors:" );

			dm.dmPelsWidth = width * 2;
			dm.dmPelsHeight = height;
			dm.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT;

			if( r_colorbits->integer != 0 )
			{
				dm.dmBitsPerPel = r_colorbits->integer;
				dm.dmFields |= DM_BITSPERPEL;
//.........这里部分代码省略.........
开发者ID:Racenet,项目名称:racesow,代码行数:101,代码来源:win_glw.c


示例20: RE_Shutdown

/*
===============
RE_Shutdown
===============
*/
void RE_Shutdown( qboolean destroyWindow ) {	

//	Com_Printf ("RE_Shutdown( %i )\n", destroyWindow );

	Cmd_RemoveCommand ("imagelist");
	Cmd_RemoveCommand ("shaderlist");
	Cmd_RemoveCommand ("skinlist");
	Cmd_RemoveCommand ("fontlist");
	Cmd_RemoveCommand ("screenshot");
	Cmd_RemoveCommand ("screenshot_tga");
	Cmd_RemoveCommand ("gfxinfo");
	Cmd_RemoveCommand ("r_atihack");
	Cmd_RemoveCommand ("r_we");
	Cmd_RemoveCommand ("imagecacheinfo");
	Cmd_RemoveCommand ("modellist");
	Cmd_RemoveCommand ("modelist");
	Cmd_RemoveCommand ("modelcacheinfo");
#ifndef DEDICATED

	if ( r_DynamicGlow && r_DynamicGlow->integer )
	{
		// Release the Glow Vertex Shader.
		if ( tr.glowVShader )
		{
			qglDeleteProgramsARB( 1, &tr.glowVShader );
		}

		// Release Pixel Shader.
		if ( tr.glowPShader )
		{
			if ( qglCombinerParameteriNV  )
			{
				// Release the Glow Regcom call list.
				qglDeleteLists( tr.glowPShader, 1 );
			}
			else if ( qglGenProgramsARB )
			{
				// Release the Glow Fragment Shader.
				qglDeleteProgramsARB( 1, &tr.glowPShader );
			}
		}

		// Release the scene glow texture.
		qglDeleteTextures( 1, &tr.screenGlow );

		// Release the scene texture.
		qglDeleteTextures( 1, &tr.sceneImage );

		// Release the blur texture.
		qglDeleteTextures( 1, &tr.blurImage );
	}

	R_TerrainShutdown(); //rwwRMG - added

	R_ShutdownFonts();
	if ( tr.registered ) {
		R_SyncRenderThread();
		R_ShutdownCommandBuffers();
		if (destroyWindow)
		{
			R_DeleteTextures();		// only do this for vid_restart now, not during things like map load
		}
	}

	// shut down platform specific OpenGL stuff
	if ( destroyWindow ) {
		GLimp_Shutdown();
	}
#endif //!DEDICATED

	tr.registered = qfalse;
}
开发者ID:Camron,项目名称:OpenJK,代码行数:77,代码来源:tr_init.cpp



注:本文中的GLimp_Shutdown函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GLint函数代码示例发布时间:2022-05-30
下一篇:
C++ GLimp_LogComment函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap