从分析blender轮廓提取技术中学习opengl如何绘制三维模型轮廓
v3d->pixsize= 2.0f*(len1>len2?len1:len2);
/* correct for window size */
if(sa->winx > sa->winy) v3d->pixsize/= (float)sa->winx;
else v3d->pixsize/= (float)sa->winy;
}
if(v3d->drawtype > OB_WIRE) {
float col[3];
BIF_GetThemeColor3fv(TH_BACK, col);
glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
}
myloadmatrix(v3d->viewmat);
persp(PERSP_STORE); // store correct view for persp(PERSP_VIEW) calls
/* set zbuffer after we draw clipping region */
if(v3d->drawtype > OB_WIRE) {
v3d->zbuf= TRUE;
glEnable(GL_DEPTH_TEST);
}
// needs to be done always, gridview is adjusted in drawgrid() now
v3d->gridview= v3d->grid;
if(v3d->view==0 || v3d->persp!=0) {
drawfloor();
}
/* then draw not selected and the duplis, but skip editmode object */
for(base= G.scene->base.first; base; base= base->next) {
if(v3d->lay & base->lay) {
/* dupli drawing */