}
if(v3d->drawtype > OB_WIRE) {
- if(G.f & G_SIMULATION)
- glClearColor(0.0, 0.0, 0.0, 0.0);
- else {
- float col[3];
- BIF_GetThemeColor3fv(TH_BACK, col);
- glClearColor(col[0], col[1], col[2], 0.0);
- }
+ 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();
}
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- /* abuse! to make sure it doesnt draw the helpstuff */
- G.f |= G_SIMULATION;
+ G.f |= G_RENDER_OGL;
+ if(shadow)
+ G.f |= G_RENDER_SHADOW;
/* first draw set */
if(G.scene->set) {
glDisable(GL_DEPTH_TEST);
}
- if(v3d->gpd) {
- /* draw grease-pencil overlays
+ if((v3d->gpd) && (v3d->flag2 & V3D_DISPGP)) {
+ /* draw grease-pencil overlays (only if enabled)
* WARNING: view matrices are altered here!
*/
draw_gpencil_oglrender(v3d, winx, winy);
}
- G.f &= ~G_SIMULATION;
+ G.f &= ~(G_RENDER_OGL|G_RENDER_SHADOW);
if(!shadow) {
glFlush();