本文整理汇总了C++中GLRenderer::addCustomListItem方法的典型用法代码示例。如果您正苦于以下问题:C++ GLRenderer::addCustomListItem方法的具体用法?C++ GLRenderer::addCustomListItem怎么用?C++ GLRenderer::addCustomListItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GLRenderer
的用法示例。
在下文中一共展示了GLRenderer::addCustomListItem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sizeof
//.........这里部分代码省略.........
case OBJTYPE_MODEL:
GL_AddModelToLists(&list->obj);
break;
case OBJTYPE_LIGHT:
GL_AddLight(0, &list->obj);
break;
default:
break;
}
}
//polys
scenefacelist_t *flist;
for (flist = scenefacelist; flist; flist = flist->next)
{
renderer.addPoly(flist, NULL, flist->shader);
}
//decals
for (flist = scenefacelist_decals; flist; flist = flist->next)
{
renderer.addPoly(flist, NULL, flist->shader);
}
//lights
scenelightlist_t *llist;
for (llist = scenelightlist; llist; llist = llist->next)
{
worldLight_t *l = &worldlights[lightCount++];
M_CopyVec3(llist->light.color, l->color);
M_CopyVec3(llist->light.pos, l->origin);
renderer.addLight(l, NULL, 0);
}
//// END SCENE DATA ////
//// ENVIRO ////
if(!(camera->flags & CAM_NO_WORLD)) {
//terrain
if (!(scene_cam->flags & CAM_NO_TERRAIN))
renderer.addCustomListItem(&terrainItem, false);
//sprites
for (std::list<scenelist_t*>::iterator itr = spritelist.begin(); itr != spritelist.end(); itr++)
{
scenelist_t *sprite = *itr;
renderer.addSprite(sprite, &sprite->obj, sprite->obj.shader);
}
//clouds (at the back)
if(gfx_sky.integer) {
renderer.addCustomListItem(&cloudsItem, false);
}
if(gfx_water.integer) {
waterItem.set(NULL,NULL,0);
renderer.addCustomListItem(&waterItem, false);
}
//sky
if (gfx_sky.integer) {
if(Cvar_GetInteger("tl_suntod") <= 1440)
sky.setTimeofDay(Cvar_GetValue("tl_suntod")/1440.0f);
else
sky.setTimeofDay((Cvar_GetValue("tod_sunminute"))/1440.0f);
//renderer.addListItem(&clouds, false);
renderer.addCustomListItem(&sky, false);
}
//// FX LAYER ////
//polys
for (flist = scenefxfacelist; flist; flist = flist->next)
{
renderer.addPolyFX(flist, NULL, flist->shader);
}
//decals
for (flist = scenefxfacelist_decals; flist; flist = flist->next)
{
renderer.addPolyFX(flist, NULL, flist->shader);
}
//sprites
for (std::list<scenelist_t*>::iterator itr = spritefxlist.begin(); itr != spritefxlist.end(); itr++)
{
scenelist_t *sprite = *itr;
renderer.addSpriteFX(sprite, &sprite->obj, sprite->obj.shader);
}
}
//// RENDER ////
renderer.render(camera->time-lasttime);
lasttime = camera->time;
}