Gooseberry request:
Show World will now influence if world is rendered in opengl rendering. This is a little undefined according to blender history, since sky used to always be drawn when offscreen rendering, as if "Only Render" was ticked. Since if we don't draw sky in that case there's no valid color really (and using theme colors is not so nice) we just draw transparent background.
This commit is contained in:
parent
67fcf5256d
commit
2081fd1d7d
Notes:
blender-bot
2023-02-14 08:29:54 +01:00
Referenced by issue #47159, OpenGL render ignores Alpha Mode and Anti-Aliasing settings
|
@ -1528,7 +1528,7 @@ void UI_ThemeClearColor(int colorid)
|
|||
float col[3];
|
||||
|
||||
UI_GetThemeColor3fv(colorid, col);
|
||||
glClearColor(col[0], col[1], col[2], 0.0);
|
||||
glClearColor(col[0], col[1], col[2], 0.0f);
|
||||
}
|
||||
|
||||
int UI_ThemeMenuShadowWidth(void)
|
||||
|
|
|
@ -136,7 +136,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
|
|||
int sizey = oglrender->sizey;
|
||||
const short view_context = (v3d != NULL);
|
||||
bool draw_bgpic = true;
|
||||
bool draw_sky = (scene->r.alphamode == R_ADDSKY);
|
||||
bool draw_sky = (scene->r.alphamode == R_ADDSKY) && v3d && (v3d->flag3 & V3D_SHOW_WORLD);
|
||||
unsigned char *rect = NULL;
|
||||
|
||||
rr = RE_AcquireResultRead(oglrender->re);
|
||||
|
|
|
@ -3175,7 +3175,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, in
|
|||
RegionView3D *rv3d = ar->regiondata;
|
||||
ImBuf *ibuf;
|
||||
GPUOffScreen *ofs;
|
||||
bool draw_sky = (alpha_mode == R_ADDSKY);
|
||||
bool draw_sky = (alpha_mode == R_ADDSKY) && v3d && (v3d->flag3 & V3D_SHOW_WORLD);
|
||||
|
||||
/* state changes make normal drawing go weird otherwise */
|
||||
glPushAttrib(GL_LIGHTING_BIT);
|
||||
|
|
Loading…
Reference in New Issue