mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-02-16 17:11:15 +00:00
Few small changes
might add slight perf improvements as there was some buffer swap stuff not needed
This commit is contained in:
parent
e06ba21101
commit
12987c20b9
5 changed files with 19 additions and 14 deletions
|
@ -1422,7 +1422,7 @@ int R_IQMLerpTag( orientation_t *tag, iqmData_t *data,
|
|||
=============================================================
|
||||
=============================================================
|
||||
*/
|
||||
void R_TransformModelToClip( const vec3_t src, const float *modelMatrix, const float *projectionMatrix,
|
||||
void R_TransformModelToClip( const vec3_t src, const float *viewMatrix, const float *projectionMatrix,
|
||||
vec4_t eye, vec4_t dst );
|
||||
void R_TransformClipToWindow( const vec4_t clip, const viewParms_t *view, vec4_t normalized, vec4_t window );
|
||||
|
||||
|
|
|
@ -199,16 +199,16 @@ R_TransformModelToClip
|
|||
|
||||
==========================
|
||||
*/
|
||||
void R_TransformModelToClip( const vec3_t src, const float *modelMatrix, const float *projectionMatrix,
|
||||
void R_TransformModelToClip( const vec3_t src, const float *viewMatrix, const float *projectionMatrix,
|
||||
vec4_t eye, vec4_t dst ) {
|
||||
int i;
|
||||
|
||||
for ( i = 0 ; i < 4 ; i++ ) {
|
||||
eye[i] =
|
||||
src[0] * modelMatrix[ i + 0 * 4 ] +
|
||||
src[1] * modelMatrix[ i + 1 * 4 ] +
|
||||
src[2] * modelMatrix[ i + 2 * 4 ] +
|
||||
1 * modelMatrix[ i + 3 * 4 ];
|
||||
src[0] * viewMatrix[ i + 0 * 4 ] +
|
||||
src[1] * viewMatrix[ i + 1 * 4 ] +
|
||||
src[2] * viewMatrix[ i + 2 * 4 ] +
|
||||
1 * viewMatrix[ i + 3 * 4 ];
|
||||
}
|
||||
|
||||
for ( i = 0 ; i < 4 ; i++ ) {
|
||||
|
|
|
@ -1388,6 +1388,7 @@ const void *RB_SwapBuffers( const void *data ) {
|
|||
ri.Hunk_FreeTempMemory( stencilReadback );
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (glRefConfig.framebufferObject)
|
||||
{
|
||||
if (!backEnd.framePostProcessed)
|
||||
|
@ -1404,14 +1405,16 @@ const void *RB_SwapBuffers( const void *data ) {
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( !glState.finishCalled ) {
|
||||
if ( !glState.finishCalled )
|
||||
{
|
||||
qglFinish();
|
||||
}
|
||||
|
||||
GLimp_LogComment( "***************** RB_SwapBuffers *****************\n\n\n" );
|
||||
//GLimp_LogComment( "***************** RB_SwapBuffers *****************\n\n\n" );
|
||||
|
||||
GLimp_EndFrame();
|
||||
//GLimp_EndFrame();
|
||||
|
||||
backEnd.framePostProcessed = qfalse;
|
||||
backEnd.projection2D = qfalse;
|
||||
|
|
|
@ -429,16 +429,16 @@ R_TransformModelToClip
|
|||
|
||||
==========================
|
||||
*/
|
||||
void R_TransformModelToClip( const vec3_t src, const float *modelMatrix, const float *projectionMatrix,
|
||||
void R_TransformModelToClip( const vec3_t src, const float *viewMatrix, const float *projectionMatrix,
|
||||
vec4_t eye, vec4_t dst ) {
|
||||
int i;
|
||||
|
||||
for ( i = 0 ; i < 4 ; i++ ) {
|
||||
eye[i] =
|
||||
src[0] * modelMatrix[ i + 0 * 4 ] +
|
||||
src[1] * modelMatrix[ i + 1 * 4 ] +
|
||||
src[2] * modelMatrix[ i + 2 * 4 ] +
|
||||
1 * modelMatrix[ i + 3 * 4 ];
|
||||
src[0] * viewMatrix[ i + 0 * 4 ] +
|
||||
src[1] * viewMatrix[ i + 1 * 4 ] +
|
||||
src[2] * viewMatrix[ i + 2 * 4 ] +
|
||||
1 * viewMatrix[ i + 3 * 4 ];
|
||||
}
|
||||
|
||||
for ( i = 0 ; i < 4 ; i++ ) {
|
||||
|
|
|
@ -1106,6 +1106,7 @@ Responsible for doing a swapbuffers
|
|||
*/
|
||||
void GLimp_EndFrame( void )
|
||||
{
|
||||
#if 0
|
||||
// don't flip if drawing to front buffer
|
||||
if ( Q_stricmp( r_drawBuffer->string, "GL_FRONT" ) != 0 )
|
||||
{
|
||||
|
@ -1144,4 +1145,5 @@ void GLimp_EndFrame( void )
|
|||
|
||||
r_fullscreen->modified = qfalse;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue