本文整理汇总了C++中refexport_t::RenderFrame方法的典型用法代码示例。如果您正苦于以下问题:C++ refexport_t::RenderFrame方法的具体用法?C++ refexport_t::RenderFrame怎么用?C++ refexport_t::RenderFrame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类refexport_t
的用法示例。
在下文中一共展示了refexport_t::RenderFrame方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Menu_Draw
void Menu_Draw ( menuframework_t *menu )
{
char scratch[MAX_QPATH];
static int yaw;
// int maxframe = 29;
entity_t entity;
int i;
menucommon_t *item;
refdef_t refdef;
// Draw rotating Quake II Symbol
memset( &refdef, 0, sizeof( refdef ) );
memset( &entity, 0, sizeof( entity ) );
refdef.x = 0;
refdef.y = 0;
refdef.width = viddef.width;
refdef.height = viddef.height;
refdef.fov_x = 35;
refdef.fov_y = CalcFov( refdef.fov_x, refdef.width, refdef.height );
refdef.time = cls.realtime * 0.001;
refdef.areabits = NULL;
refdef.num_entities = 1;
//refdef.lightstyles = 5; // Gentle Pulse
refdef.lightstyles = 63; // Testing (FULLBRIGHT)
refdef.rdflags = RDF_NOWORLDMODEL;
refdef.blend[0] = 1.0;
refdef.blend[1] = 1.0;
refdef.blend[2] = 1.0;
refdef.blend[3] = 0.0;
refdef.dlights = NULL;
refdef.num_dlights = 0;
refdef.num_particles = 0;
refdef.particles = NULL;
VectorSet(refdef.viewangles, 1.0, 0.0, 0.0);
VectorClear(refdef.vieworg);
//if (!strcmp(vid_ref->string, "soft"))
// Com_sprintf( scratch, sizeof( scratch ), "models/items/quaddama/tris.md2");
//else
Com_sprintf( scratch, sizeof( scratch ), "models/MenuModel/quad.md2");
entity.model = re.RegisterModel( scratch );
//entity.Model_Type = 0;
entity.flags = RF_MINLIGHT | RF_DEPTHHACK | RF_FULLBRIGHT | RF_GLOW | RF_NOSHADOW;
entity.origin[0] = 80;
entity.origin[1] = 0;
entity.origin[2] = -18; // -18 compensates for the float height of the model
VectorCopy( entity.origin, entity.oldorigin );
entity.frame = 0;
entity.oldframe = 0;
entity.backlerp = 0.0;
entity.angles[1] = yaw++;
if ( ++yaw > 360 )
yaw -= 360;
refdef.entities = &entity;
// Fog the scene
//refdef.blend[0] = 0.55;
//refdef.blend[1] = 0.55;
//refdef.blend[2] = 0.55;
//refdef.blend[3] = 0.55;
if (cl_3dmenubg->value)
{
// Draw scene
MenuRefdefActive = 1;
re.RenderFrame( &refdef );
//Menu_DrawBackground("q2bg.tga");
}
// Draw the menu version information
if (cl_menustamp->value > 0)
{
/*
1 - Regular string
2 - Regular string plus drop shadow (green... not effective)
3 - All green string
*/
if (cl_menustamp->value == 1)
{
// Draw the text
Menu_DrawString (viddef.width - (strlen(MENUSTAMP) * FONTSIZE) - (FONTSIZE * 3), viddef.height - FONTSIZE, MENUSTAMP);
}
else if (cl_menustamp->value == 2)
{
// Draw the drop shadow (we need black characters)
DrawAltString (viddef.width - (strlen(MENUSTAMP) * FONTSIZE) - (FONTSIZE * 3) - 1, viddef.height - FONTSIZE, MENUSTAMP);
// Draw the text
Menu_DrawString (viddef.width - (strlen(MENUSTAMP) * FONTSIZE) - (FONTSIZE * 3), viddef.height - FONTSIZE - 1, MENUSTAMP);
}
else if (cl_menustamp->value == 3)
{
// Draw the text
DrawAltString (viddef.width - (strlen(MENUSTAMP) * FONTSIZE) - (FONTSIZE * 3), viddef.height - FONTSIZE, MENUSTAMP);
}
}
//.........这里部分代码省略.........