diff options
| author | Erik Kundiman <erik@megapahit.org> | 2023-09-10 10:22:24 +0800 | 
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2023-09-10 10:22:24 +0800 | 
| commit | 40cff2fdf26aec70ee02fd91777e697d77a9c11d (patch) | |
| tree | 542db325b6fb02607ecee6f20c4aa5f578d2051e /indra/newview | |
| parent | b7bb44714f9305bb4bc93291f5706a92b5aeaae8 (diff) | |
Preprocess GLU implementors only code
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llhudrender.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llviewercamera.cpp | 8 | 
2 files changed, 10 insertions, 0 deletions
| diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp index dff310ecf9..4e17f2fb5b 100644 --- a/indra/newview/llhudrender.cpp +++ b/indra/newview/llhudrender.cpp @@ -117,9 +117,11 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,  		proj[i] = (F64) gGLProjection[i];  	} +#if GLU_VERSION_1_1  	gluProject(render_pos.mV[0], render_pos.mV[1], render_pos.mV[2],  				mdlv, proj, (GLint*) viewport,  				&winX, &winY, &winZ); +#endif  	//fonts all render orthographically, set up projection``  	gGL.matrixMode(LLRender::MM_PROJECTION); diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index 5d8e80cc41..9ca122b25f 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -191,6 +191,7 @@ void LLViewerCamera::calcProjection(const F32 far_distance) const  //static  void LLViewerCamera::updateFrustumPlanes(LLCamera& camera, BOOL ortho, BOOL zflip, BOOL no_hacks)  { +#if GLU_VERSION_1_1  	GLint* viewport = (GLint*) gGLViewport;  	F64 model[16];  	F64 proj[16]; @@ -283,6 +284,7 @@ void LLViewerCamera::updateFrustumPlanes(LLCamera& camera, BOOL ortho, BOOL zfli  	}  	camera.calcAgentFrustumPlanes(frust); +#endif // GLU_VERSION_1_1  }  void LLViewerCamera::setPerspective(BOOL for_selection, @@ -425,12 +427,14 @@ void LLViewerCamera::projectScreenToPosAgent(const S32 screen_x, const S32 scree  		proj[i] = (F64) gGLProjection[i];  	} +#if GLU_VERSION_1_1  	gluUnProject(  		GLdouble(screen_x), GLdouble(screen_y), 0.0,  		mdlv, proj, (GLint*)gGLViewport,  		&x,  		&y,  		&z ); +#endif  	pos_agent->setVec( (F32)x, (F32)y, (F32)z );  } @@ -473,6 +477,7 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord  		proj[i] = (F64) gGLProjection[i];  	} +#if GLU_VERSION_1_1  	if (GL_TRUE == gluProject(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ],  								mdlv, proj, (GLint*)viewport,  								&x, &y, &z)) @@ -549,6 +554,7 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord  		}  	}  	else +#endif // GLU_VERSION_1_1  	{  		return FALSE;  	} @@ -560,6 +566,7 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord  BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent,  												LLCoordGL &out_point) const  { +#if GLU_VERSION_1_1  	LLVector3 dir_to_point = pos_agent - getOrigin();  	dir_to_point /= dir_to_point.magVec(); @@ -706,6 +713,7 @@ BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent,  		out_point.mY = int_y + world_rect.mBottom;  		return TRUE;  	} +#endif // GLU_VERSION_1_1  	return FALSE;  } | 
