Get rid of GLimp_EnableLogging

Only stubs left.
This commit is contained in:
dhewg 2011-12-29 17:18:12 +01:00
parent 3be7fae15c
commit 32530bf7a2
22 changed files with 0 additions and 2064 deletions

View file

@ -1931,7 +1931,6 @@ void idImageManager::BindNull() {
tmu = &backEnd.glState.tmu[backEnd.glState.currenttmu];
RB_LogComment( "BindNull()\n" );
if ( tmu->textureType == TT_CUBIC ) {
qglDisable( GL_TEXTURE_CUBE_MAP_EXT );
} else if ( tmu->textureType == TT_3D ) {

View file

@ -1693,10 +1693,6 @@ Automatically enables 2D mapping, cube mapping, or 3D texturing if needed
==============
*/
void idImage::Bind() {
if ( tr.logFile ) {
RB_LogComment( "idImage::Bind( %s )\n", imgName.c_str() );
}
// if this is an image that we are caching, move it to the front of the LRU chain
if ( partialImage ) {
if ( cacheUsageNext ) {
@ -1789,10 +1785,6 @@ do any enable / disable changes
==============
*/
void idImage::BindFragment() {
if ( tr.logFile ) {
RB_LogComment( "idImage::BindFragment %s )\n", imgName.c_str() );
}
// if this is an image that we are caching, move it to the front of the LRU chain
if ( partialImage ) {
if ( cacheUsageNext ) {

View file

@ -288,9 +288,6 @@ static void R_CheckCvars( void ) {
r_brightness.ClearModified();
R_SetColorMappings();
}
// check for changes to logging state
GLimp_EnableLogging( r_logFile.GetInteger() != 0 );
}
/*

View file

@ -131,7 +131,6 @@ idCVar r_useInteractionCulling( "r_useInteractionCulling", "1", CVAR_RENDERER |
idCVar r_useInteractionScissors( "r_useInteractionScissors", "2", CVAR_RENDERER | CVAR_INTEGER, "1 = use a custom scissor rectangle for each shadow interaction, 2 = also crop using portal scissors", -2, 2, idCmdSystem::ArgCompletion_Integer<-2,2> );
idCVar r_useShadowCulling( "r_useShadowCulling", "1", CVAR_RENDERER | CVAR_BOOL, "try to cull shadows from partially visible lights" );
idCVar r_useFrustumFarDistance( "r_useFrustumFarDistance", "0", CVAR_RENDERER | CVAR_FLOAT, "if != 0 force the view frustum far distance to this distance" );
idCVar r_logFile( "r_logFile", "0", CVAR_RENDERER | CVAR_INTEGER, "number of frames to emit GL logs" );
idCVar r_clear( "r_clear", "2", CVAR_RENDERER, "force screen clear every frame, 1 = purple, 2 = black, 'r g b' = custom" );
idCVar r_offsetFactor( "r_offsetfactor", "0", CVAR_RENDERER | CVAR_FLOAT, "polygon offset parameter" );
idCVar r_offsetUnits( "r_offsetunits", "-600", CVAR_RENDERER | CVAR_FLOAT, "polygon offset parameter" );
@ -2102,7 +2101,6 @@ void idRenderSystemLocal::Clear( void ) {
memset( &pc, 0, sizeof( pc ) );
memset( &lockSurfacesCmd, 0, sizeof( lockSurfacesCmd ) );
memset( &identitySpace, 0, sizeof( identitySpace ) );
logFile = NULL;
stencilIncr = 0;
stencilDecr = 0;
memset( renderCrops, 0, sizeof( renderCrops ) );
@ -2191,13 +2189,6 @@ void idRenderSystemLocal::Shutdown( void ) {
globalImages->Shutdown();
// close the r_logFile
if ( logFile ) {
fprintf( logFile, "*** CLOSING LOG ***\n" );
fclose( logFile );
logFile = 0;
}
// free frame memory
R_ShutdownFrameData();

View file

@ -476,8 +476,6 @@ static void RB_RenderViewLight( viewLight_t *vLight ) {
return;
}
RB_LogComment( "---------- RB_RenderViewLight 0x%p ----------\n", vLight );
// clear the stencil buffer if needed
if ( vLight->globalShadows || vLight->localShadows ) {
backEnd.currentScissor = vLight->scissorRect;

View file

@ -47,7 +47,6 @@ GL_SelectTextureNoClient
static void GL_SelectTextureNoClient( int unit ) {
backEnd.glState.currenttmu = unit;
qglActiveTextureARB( GL_TEXTURE0_ARB + unit );
RB_LogComment( "glActiveTextureARB( %i )\n", unit );
}
/*

View file

@ -525,8 +525,6 @@ void RB_STD_FillDepthBuffer( drawSurf_t **drawSurfs, int numDrawSurfs ) {
return;
}
RB_LogComment( "---------- RB_STD_FillDepthBuffer ----------\n" );
// enable the second texture for mirror plane clipping if needed
if ( backEnd.viewDef->numClipPlanes ) {
GL_SelectTexture( 1 );
@ -978,8 +976,6 @@ int RB_STD_DrawShaderPasses( drawSurf_t **drawSurfs, int numDrawSurfs ) {
return numDrawSurfs;
}
RB_LogComment( "---------- RB_STD_DrawShaderPasses ----------\n" );
// if we are about to draw the first surface that needs
// the rendering in a texture, copy it over
if ( drawSurfs[0]->material->GetSort() >= SS_POST_PROCESS ) {
@ -1183,8 +1179,6 @@ void RB_StencilShadowPass( const drawSurf_t *drawSurfs ) {
return;
}
RB_LogComment( "---------- RB_StencilShadowPass ----------\n" );
globalImages->BindNull();
qglDisableClientState( GL_TEXTURE_COORD_ARRAY );
@ -1302,7 +1296,6 @@ static void RB_BlendLight( const drawSurf_t *drawSurfs, const drawSurf_t *drawS
if ( r_skipBlendLights.GetBool() ) {
return;
}
RB_LogComment( "---------- RB_BlendLight ----------\n" );
lightShader = backEnd.vLight->lightShader;
regs = backEnd.vLight->shaderRegisters;
@ -1419,8 +1412,6 @@ static void RB_FogPass( const drawSurf_t *drawSurfs, const drawSurf_t *drawSurf
const shaderStage_t *stage;
const float *regs;
RB_LogComment( "---------- RB_FogPass ----------\n" );
// create a surface for the light frustom triangles, which are oriented drawn side out
frustumTris = backEnd.vLight->frustumTris;
@ -1539,8 +1530,6 @@ void RB_STD_FogAllLights( void ) {
return;
}
RB_LogComment( "---------- RB_STD_FogAllLights ----------\n" );
qglDisable( GL_STENCIL_TEST );
for ( vLight = backEnd.viewDef->viewLights ; vLight ; vLight = vLight->next ) {
@ -1607,8 +1596,6 @@ void RB_STD_LightScale( void ) {
return;
}
RB_LogComment( "---------- RB_STD_LightScale ----------\n" );
// the scissor may be smaller than the viewport for subviews
if ( r_useScissor.GetBool() ) {
qglScissor( backEnd.viewDef->viewport.x1 + backEnd.viewDef->scissor.x1,
@ -1668,8 +1655,6 @@ void RB_STD_DrawView( void ) {
drawSurf_t **drawSurfs;
int numDrawSurfs;
RB_LogComment( "---------- RB_STD_DrawView ----------\n" );
backEnd.depthFunc = GLS_DEPTHFUNC_EQUAL;
drawSurfs = (drawSurf_t **)&backEnd.viewDef->drawSurfs[0];

View file

@ -342,7 +342,6 @@ GL_SelectTextureNoClient
static void GL_SelectTextureNoClient( int unit ) {
backEnd.glState.currenttmu = unit;
qglActiveTextureARB( GL_TEXTURE0_ARB + unit );
RB_LogComment( "glActiveTextureARB( %i )\n", unit );
}
@ -1888,8 +1887,6 @@ void R_EXP_RenderViewDepthImage( void ) {
backEnd.viewDef->viewport.y1, backEnd.viewDef->viewport.x2 - backEnd.viewDef->viewport.x1 + 1,
backEnd.viewDef->viewport.y2 - backEnd.viewDef->viewport.y1 + 1 );
} else {
RB_LogComment( "---------- R_EXP_RenderViewDepthImage ----------\n" );
if ( r_sb_usePbuffer.GetBool() ) {
GL_CheckErrors();
// set the current openGL drawable to the shadow buffer

View file

@ -62,9 +62,6 @@ static void RB_RenderInteraction( const drawSurf_t *surf ) {
const srfTriangles_t *tri = surf->geo;
const shaderStage_t *lastBumpStage = NULL;
RB_LogComment( "---------- RB_RenderInteraction %s on %s ----------\n",
lightShader->GetName(), surfaceShader->GetName() );
// change the matrix and light projection vectors if needed
if ( surf->space != backEnd.currentSpace ) {
backEnd.currentSpace = surf->space;
@ -577,8 +574,6 @@ static void RB_RenderViewLight( viewLight_t *vLight ) {
return;
}
RB_LogComment( "---------- RB_RenderViewLight 0x%p ----------\n", vLight );
// clear the stencil buffer if needed
if ( vLight->globalShadows || vLight->localShadows ) {
backEnd.currentScissor = vLight->scissorRect;

View file

@ -61,7 +61,6 @@ GL_SelectTextureNoClient
void GL_SelectTextureNoClient( int unit ) {
backEnd.glState.currenttmu = unit;
qglActiveTextureARB( GL_TEXTURE0_ARB + unit );
RB_LogComment( "glActiveTextureARB( %i )\n", unit );
}
/*
@ -144,8 +143,6 @@ it will have to be done on an itterated basis
==================
*/
static void RB_NV20_DI_BumpAndLightPass( const drawInteraction_t *din, bool monoLightShader ) {
RB_LogComment( "---------- RB_NV_BumpAndLightPass ----------\n" );
GL_State( GLS_COLORMASK | GLS_DEPTHMASK | backEnd.depthFunc );
// texture 0 is the normalization cube map
@ -259,8 +256,6 @@ RB_NV20_DI_DiffuseColorPass
==================
*/
static void RB_NV20_DI_DiffuseColorPass( const drawInteraction_t *din ) {
RB_LogComment( "---------- RB_NV20_DiffuseColorPass ----------\n" );
GL_State( GLS_SRCBLEND_DST_ALPHA | GLS_DSTBLEND_ONE | GLS_DEPTHMASK | GLS_ALPHAMASK
| backEnd.depthFunc );
@ -412,8 +407,6 @@ RB_NV20_DI_SpecularColorPass
==================
*/
static void RB_NV20_DI_SpecularColorPass( const drawInteraction_t *din ) {
RB_LogComment( "---------- RB_NV20_SpecularColorPass ----------\n" );
GL_State( GLS_SRCBLEND_DST_ALPHA | GLS_DSTBLEND_ONE | GLS_DEPTHMASK | GLS_ALPHAMASK
| backEnd.depthFunc );
@ -555,8 +548,6 @@ RB_NV20_DI_DiffuseAndSpecularColorPass
==================
*/
static void RB_NV20_DI_DiffuseAndSpecularColorPass( const drawInteraction_t *din ) {
RB_LogComment( "---------- RB_NV20_DI_DiffuseAndSpecularColorPass ----------\n" );
GL_State( GLS_SRCBLEND_DST_ALPHA | GLS_DSTBLEND_ONE | GLS_DEPTHMASK | backEnd.depthFunc );
// texture 0 is the normalization cube map for the half angle
@ -778,8 +769,6 @@ void RB_NV20_DrawInteractions( void ) {
backEnd.vLight = vLight;
RB_LogComment( "---------- RB_RenderViewLight 0x%p ----------\n", vLight );
// clear the stencil buffer if needed
if ( vLight->globalShadows || vLight->localShadows ) {
backEnd.currentScissor = vLight->scissorRect;

View file

@ -288,8 +288,6 @@ void RB_R200_DrawInteractions( void ) {
backEnd.vLight = vLight;
RB_LogComment( "---------- RB_RenderViewLight 0x%p ----------\n", vLight );
// clear the stencil buffer if needed
if ( vLight->globalShadows || vLight->localShadows ) {
backEnd.currentScissor = vLight->scissorRect;

View file

@ -43,8 +43,6 @@ may touch, including the editor.
void RB_SetDefaultGLState( void ) {
int i;
RB_LogComment( "--- R_SetDefaultGLState ---\n" );
qglClearDepth( 1.0f );
qglColor4f (1,1,1,1);
@ -101,23 +99,6 @@ void RB_SetDefaultGLState( void ) {
}
/*
====================
RB_LogComment
====================
*/
void RB_LogComment( const char *comment, ... ) {
va_list marker;
if ( !tr.logFile ) {
return;
}
fprintf( tr.logFile, "// " );
va_start( marker, comment );
vfprintf( tr.logFile, comment, marker );
va_end( marker );
}
//=============================================================================
@ -141,7 +122,6 @@ void GL_SelectTexture( int unit ) {
qglActiveTextureARB( GL_TEXTURE0_ARB + unit );
qglClientActiveTextureARB( GL_TEXTURE0_ARB + unit );
RB_LogComment( "glActiveTextureARB( %i );\nglClientActiveTextureARB( %i );\n", unit, unit );
backEnd.glState.currenttmu = unit;
}
@ -554,8 +534,6 @@ const void RB_SwapBuffers( const void *data ) {
qglFinish();
}
RB_LogComment( "***************** RB_SwapBuffers *****************\n\n\n" );
// don't flip if drawing to front buffer
if ( !r_frontBuffer.GetBool() ) {
GLimp_SwapBuffers();
@ -578,8 +556,6 @@ const void RB_CopyRender( const void *data ) {
return;
}
RB_LogComment( "***************** RB_CopyRender *****************\n" );
if (cmd->image) {
cmd->image->CopyFramebuffer( cmd->x, cmd->y, cmd->imageWidth, cmd->imageHeight, false );
}

View file

@ -792,8 +792,6 @@ public:
drawSurfsCommand_t lockSurfacesCmd; // use this when r_lockSurfaces = 1
viewEntity_t identitySpace; // can use if we don't know viewDef->worldSpace is valid
FILE * logFile; // for logging GL calls and frame breaks
int stencilIncr, stencilDecr; // GL_INCR / INCR_WRAP_EXT, GL_DECR / GL_DECR_EXT
renderCrop_t renderCrops[MAX_RENDER_CROPS];
@ -832,7 +830,6 @@ extern idCVar r_swapInterval; // changes wglSwapIntarval
extern idCVar r_offsetFactor; // polygon offset parameter
extern idCVar r_offsetUnits; // polygon offset parameter
extern idCVar r_singleTriangle; // only draw a single triangle per primitive
extern idCVar r_logFile; // number of frames to emit GL logs
extern idCVar r_clear; // force screen clear every frame
extern idCVar r_shadows; // enable shadows
extern idCVar r_subviewOnly; // 1 = don't render main view, allowing subviews to be debugged
@ -1114,9 +1111,6 @@ void GLimp_DeactivateContext( void );
// being immediate returns, which lets us guage how much time is
// being spent inside OpenGL.
void GLimp_EnableLogging( bool enable );
/*
====================================================================
@ -1604,9 +1598,6 @@ TR_BACKEND
void RB_SetDefaultGLState( void );
void RB_SetGL2D( void );
// write a comment to the r_logFile if it is enabled
void RB_LogComment( const char *comment, ... ) id_attribute((format(printf,1,2)));
void RB_ShowImages( void );
void RB_ExecuteBackEndCommands( const emptyCommand_t *cmds );

View file

@ -699,10 +699,6 @@ void RB_CreateSingleDrawInteractions( const drawSurf_t *surf, void (*DrawInterac
return;
}
if ( tr.logFile ) {
RB_LogComment( "---------- RB_CreateSingleDrawInteractions %s on %s ----------\n", lightShader->GetName(), surfaceShader->GetName() );
}
// change the matrix and light projection vectors if needed
if ( surf->space != backEnd.currentSpace ) {
backEnd.currentSpace = surf->space;

View file

@ -2335,8 +2335,6 @@ void RB_RenderDebugTools( drawSurf_t **drawSurfs, int numDrawSurfs ) {
return;
}
RB_LogComment( "---------- RB_RenderDebugTools ----------\n" );
GL_State( GLS_DEFAULT );
backEnd.currentScissor = backEnd.viewDef->scissor;
qglScissor( backEnd.viewDef->viewport.x1 + backEnd.currentScissor.x1,

View file

@ -64,15 +64,6 @@ static bool vidmode_active = false;
static int save_rampsize = 0;
static unsigned short *save_red, *save_green, *save_blue;
void GLimp_EnableLogging(bool log) {
static bool logging;
if (log != logging)
{
common->DPrintf("GLimp_EnableLogging - not available\n");
logging = log;
}
}
void GLimp_ActivateContext() {
assert( dpy );
assert( ctx );

View file

@ -602,11 +602,6 @@ void GLimp_Shutdown( void ) {
glw_state.window = nil;
}
if (glw_state.log_fp) {
fclose(glw_state.log_fp);
glw_state.log_fp = 0;
}
for (displayIndex = 0; displayIndex < glw_state.displayCount; displayIndex++) {
free(glw_state.originalDisplayGammaTables[displayIndex].red);
free(glw_state.originalDisplayGammaTables[displayIndex].blue);
@ -631,13 +626,6 @@ void GLimp_Shutdown( void ) {
common->Printf("----- Done shutting down GL -----\n");
}
/*
===============
GLimp_LogComment
===============
*/
void GLimp_LogComment( char *comment ) { }
/*
===============
GLimp_SetGamma
@ -1445,8 +1433,6 @@ void GLimp_ActivateContext( void ) {
[OSX_GetNSGLContext() makeCurrentContext];
}
void GLimp_EnableLogging(bool stat) { }
NSDictionary *Sys_GetMatchingDisplayMode( glimpParms_t parms ) {
NSArray *displayModes;
NSDictionary *mode;

View file

@ -48,8 +48,6 @@ typedef struct
bool _ctx_is_current;
NSWindow *window;
FILE *log_fp;
unsigned int bufferSwapCount;
unsigned int glPauseCount;
} glwstate_t;

View file

@ -377,8 +377,6 @@ void glVertex4sv(const GLshort *v){};
void glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer){};
void glViewport(GLint x, GLint y, GLsizei width, GLsizei height){};
void GLimp_EnableLogging(bool) {};
static void StubFunction( void ) {};
GLExtension_t GLimp_ExtensionPointer( const char *a) { return StubFunction; };

File diff suppressed because it is too large Load diff

View file

@ -733,16 +733,6 @@ static bool GLW_SetFullScreen( glimpParms_t parms ) {
return false;
}
/*
==================
GLimp_EnableLogging
==================
*/
void GLimp_EnableLogging( bool enable ) {
common->DPrintf("GLimp_EnableLogging - not available\n");
}
/*
===================
GLimp_Init
@ -808,9 +798,6 @@ bool GLimp_Init( glimpParms_t parms ) {
// wglSwapinterval, etc
GLW_CheckWGLExtensions( win32.hDC );
// check logging
GLimp_EnableLogging( ( r_logFile.GetInteger() != 0 ) );
return true;
}

View file

@ -122,8 +122,6 @@ struct Win32Vars_t {
bool cdsFullscreen;
FILE *log_fp;
unsigned short oldHardwareGamma[3][256];
// desktop gamma is saved here for restoration at exit