Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_draw.c
| Context not available. | |||||
| for (v3da = v3d->afterdraw_transp.first; v3da; v3da = next) { | for (v3da = v3d->afterdraw_transp.first; v3da; v3da = next) { | ||||
| next = v3da->next; | next = v3da->next; | ||||
| draw_object(scene, ar, v3d, v3da->base, v3da->dflag); | draw_object(scene, ar, v3d, v3da->base, v3da->dflag, NULL); | ||||
| BLI_remlink(&v3d->afterdraw_transp, v3da); | BLI_remlink(&v3d->afterdraw_transp, v3da); | ||||
| MEM_freeN(v3da); | MEM_freeN(v3da); | ||||
| } | } | ||||
| Context not available. | |||||
| v3d->xray = true; | v3d->xray = true; | ||||
| for (v3da = v3d->afterdraw_xray.first; v3da; v3da = next) { | for (v3da = v3d->afterdraw_xray.first; v3da; v3da = next) { | ||||
| next = v3da->next; | next = v3da->next; | ||||
| draw_object(scene, ar, v3d, v3da->base, v3da->dflag); | draw_object(scene, ar, v3d, v3da->base, v3da->dflag, NULL); | ||||
| BLI_remlink(&v3d->afterdraw_xray, v3da); | BLI_remlink(&v3d->afterdraw_xray, v3da); | ||||
| MEM_freeN(v3da); | MEM_freeN(v3da); | ||||
| } | } | ||||
| Context not available. | |||||
| for (v3da = v3d->afterdraw_xraytransp.first; v3da; v3da = next) { | for (v3da = v3d->afterdraw_xraytransp.first; v3da; v3da = next) { | ||||
| next = v3da->next; | next = v3da->next; | ||||
| draw_object(scene, ar, v3d, v3da->base, v3da->dflag); | draw_object(scene, ar, v3d, v3da->base, v3da->dflag, NULL); | ||||
| BLI_remlink(&v3d->afterdraw_xraytransp, v3da); | BLI_remlink(&v3d->afterdraw_xraytransp, v3da); | ||||
| MEM_freeN(v3da); | MEM_freeN(v3da); | ||||
| } | } | ||||
| Context not available. | |||||
| displist = glGenLists(1); | displist = glGenLists(1); | ||||
| glNewList(displist, GL_COMPILE); | glNewList(displist, GL_COMPILE); | ||||
| draw_object(scene, ar, v3d, &tbase, dflag_dupli); | draw_object(scene, ar, v3d, &tbase, dflag_dupli, dob); | ||||
psy-fi: This will fail. Display list will get called with the options used at compilation time so if… | |||||
| glEndList(); | glEndList(); | ||||
| use_displist = true; | use_displist = true; | ||||
| Context not available. | |||||
| } | } | ||||
| else { | else { | ||||
| copy_m4_m4(dob->ob->obmat, dob->mat); | copy_m4_m4(dob->ob->obmat, dob->mat); | ||||
| draw_object(scene, ar, v3d, &tbase, dflag_dupli); | draw_object(scene, ar, v3d, &tbase, dflag_dupli, dob); | ||||
Not Done Inline ActionsDue to GLSL (check above), lists are never used. This is the place where you can add the GPU_begin_dupliobject / GPU_end_dupliobject calls mentioned above. psy-fi: Due to GLSL (check above), lists are never used. This is the place where you can add the… | |||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| Scene *sce_iter; | Scene *sce_iter; | ||||
| for (SETLOOPER(scene->set, sce_iter, base)) { | for (SETLOOPER(scene->set, sce_iter, base)) { | ||||
| if (v3d->lay & base->lay) { | if (v3d->lay & base->lay) { | ||||
| draw_object(scene, ar, v3d, base, 0); | draw_object(scene, ar, v3d, base, 0, NULL); | ||||
| if (base->object->transflag & OB_DUPLI) { | if (base->object->transflag & OB_DUPLI) { | ||||
| draw_dupli_objects_color(scene, ar, v3d, base, dflag_depth, TH_UNDEFINED); | draw_dupli_objects_color(scene, ar, v3d, base, dflag_depth, TH_UNDEFINED); | ||||
| } | } | ||||
| Context not available. | |||||
| if (base->object->transflag & OB_DUPLI) { | if (base->object->transflag & OB_DUPLI) { | ||||
| draw_dupli_objects_color(scene, ar, v3d, base, dflag_depth, TH_UNDEFINED); | draw_dupli_objects_color(scene, ar, v3d, base, dflag_depth, TH_UNDEFINED); | ||||
| } | } | ||||
| draw_object(scene, ar, v3d, base, dflag_depth); | draw_object(scene, ar, v3d, base, dflag_depth, NULL); | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| glDepthFunc(GL_ALWAYS); /* always write into the depth bufer, overwriting front z values */ | glDepthFunc(GL_ALWAYS); /* always write into the depth bufer, overwriting front z values */ | ||||
| for (v3da = v3d->afterdraw_xray.first; v3da; v3da = next) { | for (v3da = v3d->afterdraw_xray.first; v3da; v3da = next) { | ||||
| next = v3da->next; | next = v3da->next; | ||||
| draw_object(scene, ar, v3d, v3da->base, dflag_depth); | draw_object(scene, ar, v3d, v3da->base, dflag_depth, NULL); | ||||
| } | } | ||||
| glDepthFunc(GL_LEQUAL); /* Now write the depth buffer normally */ | glDepthFunc(GL_LEQUAL); /* Now write the depth buffer normally */ | ||||
| } | } | ||||
| Context not available. | |||||
| v3d->transp = true; | v3d->transp = true; | ||||
| for (v3da = v3d->afterdraw_transp.first; v3da; v3da = next) { | for (v3da = v3d->afterdraw_transp.first; v3da; v3da = next) { | ||||
| next = v3da->next; | next = v3da->next; | ||||
| draw_object(scene, ar, v3d, v3da->base, dflag_depth); | draw_object(scene, ar, v3d, v3da->base, dflag_depth, NULL); | ||||
| BLI_remlink(&v3d->afterdraw_transp, v3da); | BLI_remlink(&v3d->afterdraw_transp, v3da); | ||||
| MEM_freeN(v3da); | MEM_freeN(v3da); | ||||
| } | } | ||||
| Context not available. | |||||
| v3d->transp = false; | v3d->transp = false; | ||||
| for (v3da = v3d->afterdraw_xray.first; v3da; v3da = next) { | for (v3da = v3d->afterdraw_xray.first; v3da; v3da = next) { | ||||
| next = v3da->next; | next = v3da->next; | ||||
| draw_object(scene, ar, v3d, v3da->base, dflag_depth); | draw_object(scene, ar, v3d, v3da->base, dflag_depth, NULL); | ||||
| BLI_remlink(&v3d->afterdraw_xray, v3da); | BLI_remlink(&v3d->afterdraw_xray, v3da); | ||||
| MEM_freeN(v3da); | MEM_freeN(v3da); | ||||
| } | } | ||||
| Context not available. | |||||
| v3d->transp = true; | v3d->transp = true; | ||||
| for (v3da = v3d->afterdraw_xraytransp.first; v3da; v3da = next) { | for (v3da = v3d->afterdraw_xraytransp.first; v3da; v3da = next) { | ||||
| next = v3da->next; | next = v3da->next; | ||||
| draw_object(scene, ar, v3d, v3da->base, dflag_depth); | draw_object(scene, ar, v3d, v3da->base, dflag_depth, NULL); | ||||
| BLI_remlink(&v3d->afterdraw_xraytransp, v3da); | BLI_remlink(&v3d->afterdraw_xraytransp, v3da); | ||||
| MEM_freeN(v3da); | MEM_freeN(v3da); | ||||
| } | } | ||||
| Context not available. | |||||
| for (SETLOOPER(scene->set, sce_iter, base)) { | for (SETLOOPER(scene->set, sce_iter, base)) { | ||||
| if (v3d->lay & base->lay) { | if (v3d->lay & base->lay) { | ||||
| UI_ThemeColorBlend(TH_WIRE, TH_BACK, 0.6f); | UI_ThemeColorBlend(TH_WIRE, TH_BACK, 0.6f); | ||||
| draw_object(scene, ar, v3d, base, dflag); | draw_object(scene, ar, v3d, base, dflag, NULL); | ||||
| if (base->object->transflag & OB_DUPLI) { | if (base->object->transflag & OB_DUPLI) { | ||||
| draw_dupli_objects_color(scene, ar, v3d, base, dflag, TH_UNDEFINED); | draw_dupli_objects_color(scene, ar, v3d, base, dflag, TH_UNDEFINED); | ||||
| Context not available. | |||||
| if (base->object->transflag & OB_DUPLI) | if (base->object->transflag & OB_DUPLI) | ||||
| draw_dupli_objects(scene, ar, v3d, base); | draw_dupli_objects(scene, ar, v3d, base); | ||||
| draw_object(scene, ar, v3d, base, 0); | draw_object(scene, ar, v3d, base, 0, NULL); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| } | } | ||||
| if ((base->flag & SELECT) == 0) { | if ((base->flag & SELECT) == 0) { | ||||
| if (base->object != scene->obedit) | if (base->object != scene->obedit) | ||||
| draw_object(scene, ar, v3d, base, 0); | draw_object(scene, ar, v3d, base, 0, NULL); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| for (base = scene->base.first; base; base = base->next) { | for (base = scene->base.first; base; base = base->next) { | ||||
| if (v3d->lay & base->lay) { | if (v3d->lay & base->lay) { | ||||
| if (base->object == scene->obedit || (base->flag & SELECT)) { | if (base->object == scene->obedit || (base->flag & SELECT)) { | ||||
| draw_object(scene, ar, v3d, base, 0); | draw_object(scene, ar, v3d, base, 0, NULL); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
This will fail. Display list will get called with the options used at compilation time so if particle attributes change, this won't be reflected on the instance. Also lists are not used for what you want (GLSL). Check code above to see why (use_displist disabled in that case)