/*
==================
R_ReloadGLSLPrograms_f
==================
*/
void R_ReloadGLSLPrograms_f( const idCmdArgs &args ) {
	common->Printf( "----- R_ReloadGLSLPrograms -----\n" );
	//for ( int i = 0; progs[ i ].name[ 0 ]; i++ ) {
	//	R_LoadGLSLShader( i );
	//}
	RB_GLSL_InitShaders();
	common->Printf( "-------------------------------\n" );
}
示例#2
0
/*
==================
R_ReloadGLSLShaders_f
==================
*/
void R_ReloadGLSLShaders_f( const idCmdArgs &args ) {
	common->Printf( "----- R_ReloadGLSLShaders -----\n" );
	if ( glConfig.GLSLAvailable ) {	
		if (RB_GLSL_InitShaders())
		{
			glConfig.allowGLSLPath = true;
		} else
			common->Printf( "GLSL shaders failed to init.\n" );
	} else		
		common->Printf( "Not available.\n" );
	common->Printf( "-------------------------------\n" );
}
/*
==================
R_GLSL_Init
==================
*/
void R_GLSL_Init( void ) {
	glConfig.allowGLSLPath = false;

	common->Printf( "---------- R_GLSL_Init -----------\n" );

	if ( !glConfig.GLSLAvailable ) {
		common->Printf( "Not available.\n" );
		return;
	} else if ( !RB_GLSL_InitShaders() ) {
		common->Printf( "GLSL shaders failed to init.\n" );
		return;
	}
	
	common->Printf( "Available.\n" );

	common->Printf( "---------------------------------\n" );

	glConfig.allowGLSLPath = true;
}