replaced the cameraMatrixTime variable from the renderer's public interface by a function

This commit is contained in:
myT 2017-10-03 20:13:05 +02:00
parent 70f301e4ff
commit 1d6663ebc1
4 changed files with 15 additions and 4 deletions

View File

@ -244,7 +244,7 @@ static void SCR_DrawMouseInputLatencies()
y += 30;
SCR_DrawInputStats( cl.userCmdTime - cl.mouseTime, x, y, w, h, "netw" );
y += 30;
SCR_DrawInputStats( re_cameraMatrixTime - cl.mouseTime, x, y, w, h, "draw" );
SCR_DrawInputStats( re.GetCameraMatrixTime() - cl.mouseTime, x, y, w, h, "draw" );
}

View File

@ -663,6 +663,12 @@ static void RE_EndRegistration()
}
static int RE_GetCameraMatrixTime()
{
return re_cameraMatrixTime;
}
const refexport_t* GetRefAPI( const refimport_t* rimp )
{
static refexport_t re;
@ -709,5 +715,7 @@ const refexport_t* GetRefAPI( const refimport_t* rimp )
re.TakeVideoFrame = RE_TakeVideoFrame;
re.GetCameraMatrixTime = RE_GetCameraMatrixTime;
return &re;
}

View File

@ -1535,4 +1535,7 @@ extern void GL2_BeginFrame();
extern void GL2_EndFrame();
extern int re_cameraMatrixTime;
#endif //TR_LOCAL_H

View File

@ -158,6 +158,9 @@ typedef struct {
qbool (*inPVS)( const vec3_t p1, const vec3_t p2 );
void (*TakeVideoFrame)( int h, int w, byte* captureBuffer, byte *encodeBuffer, qbool motionJpeg );
// when the final model-view matrix is computed, for cl_drawMouseLag
int (*GetCameraMatrixTime)();
} refexport_t;
//
@ -224,7 +227,4 @@ typedef struct {
const refexport_t* GetRefAPI( const refimport_t* rimp );
extern int re_cameraMatrixTime; // when the final model-view matrix is computed, for cl_drawMouseLag
#endif // __TR_PUBLIC_H