本文整理汇总了C++中GLRenderer::addPoly方法的典型用法代码示例。如果您正苦于以下问题:C++ GLRenderer::addPoly方法的具体用法?C++ GLRenderer::addPoly怎么用?C++ GLRenderer::addPoly使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GLRenderer
的用法示例。
在下文中一共展示了GLRenderer::addPoly方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sizeof
//.........这里部分代码省略.........
renderer.addLight(&sunLight, NULL, 0);
renderer.addLight(&rimLight, NULL, 0);
// The deal here is rather than changing the code in scene.cpp to support the
// new renderer, we just "import" all the scene data
//// SCENE DATA ////
lightCount = 0;
//objects
scenelist_t *list;
for (list = scenelist; list; list = list->next)
{
//if(list->cull)
// continue;
switch (list->obj.objtype)
{
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;