本文整理汇总了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();
}
开发者ID:alepulver,项目名称:dhewm3,代码行数:32,代码来源:Light.cpp
示例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();
}
开发者ID:nbohr1more,项目名称:Revelation,代码行数:12,代码来源:Light.cpp
示例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();
}
开发者ID:revelator,项目名称:Revelator-Doom3,代码行数:12,代码来源:Light.cpp
示例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();
}
开发者ID:alepulver,项目名称:dhewm3,代码行数:17,代码来源:Light.cpp
示例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();
}
开发者ID:nbohr1more,项目名称:Revelation,代码行数:19,代码来源:Light.cpp
注:本文中的PresentLightDefChange函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论