本文整理汇总了C++中PresentLightDefChange函数的典型用法代码示例。如果您正苦于以下问题:C++ PresentLightDefChange函数的具体用法?C++ PresentLightDefChange怎么用?C++ PresentLightDefChange使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PresentLightDefChange函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetPhysics
/*
================
idLight::Present
================
*/
void idLight::Present( void ) {
// don't present to the renderer if the entity hasn't changed
if ( !( thinkFlags & TH_UPDATEVISUALS ) ) {
return;
}
// add the model
idEntity::Present();
// current transformation
renderLight.axis = localLightAxis * GetPhysics()->GetAxis();
renderLight.origin = GetPhysics()->GetOrigin() + GetPhysics()->GetAxis() * localLightOrigin;
// reference the sound for shader synced effects
if ( lightParent ) {
renderLight.referenceSound = lightParent->GetSoundEmitter();
renderEntity.referenceSound = lightParent->GetSoundEmitter();
}
else {
renderLight.referenceSound = refSound.referenceSound;
renderEntity.referenceSound = refSound.referenceSound;
}
// update the renderLight and renderEntity to render the light and flare
PresentLightDefChange();
PresentModelDefChange();
}
示例2: index
/*
================
idLight::SetLightParm
================
*/
void idLight::SetLightParm( int parmnum, float value ) {
if( ( parmnum < 0 ) || ( parmnum >= MAX_ENTITY_SHADER_PARMS ) ) {
gameLocal.Error( "shader parm index (%d) out of range", parmnum );
}
renderLight.shaderParms[ parmnum ] = value;
PresentLightDefChange();
}
示例3: PresentLightDefChange
/*
================
idLight::SetRadiusXYZ
================
*/
void idLight::SetRadiusXYZ( float x, float y, float z )
{
renderLight.lightRadius[0] = x;
renderLight.lightRadius[1] = y;
renderLight.lightRadius[2] = z;
PresentLightDefChange();
}
示例4: PresentLightDefChange
/*
================
idLight::SetLightParms
================
*/
void idLight::SetLightParms( float parm0, float parm1, float parm2, float parm3 ) {
renderLight.shaderParms[ SHADERPARM_RED ] = parm0;
renderLight.shaderParms[ SHADERPARM_GREEN ] = parm1;
renderLight.shaderParms[ SHADERPARM_BLUE ] = parm2;
renderLight.shaderParms[ SHADERPARM_ALPHA ] = parm3;
renderEntity.shaderParms[ SHADERPARM_RED ] = parm0;
renderEntity.shaderParms[ SHADERPARM_GREEN ] = parm1;
renderEntity.shaderParms[ SHADERPARM_BLUE ] = parm2;
renderEntity.shaderParms[ SHADERPARM_ALPHA ] = parm3;
PresentLightDefChange();
PresentModelDefChange();
}
示例5: PresentLightDefChange
/*
================
idLight::SetLightLevel
================
*/
void idLight::SetLightLevel( void ) {
idVec3 color;
float intensity;
intensity = ( float )currentLevel / ( float )levels;
color = baseColor * intensity;
renderLight.shaderParms[ SHADERPARM_RED ] = color[ 0 ];
renderLight.shaderParms[ SHADERPARM_GREEN ] = color[ 1 ];
renderLight.shaderParms[ SHADERPARM_BLUE ] = color[ 2 ];
renderEntity.shaderParms[ SHADERPARM_RED ] = color[ 0 ];
renderEntity.shaderParms[ SHADERPARM_GREEN ] = color[ 1 ];
renderEntity.shaderParms[ SHADERPARM_BLUE ] = color[ 2 ];
PresentLightDefChange();
PresentModelDefChange();
}