Fix T35810: Texture faces display white in 3D view, when used as a Particle Object
This in fact seems some kind of video driver limitation, because it worked fine on windows but failed on linux here. The guess is that textures doesn't always work on display lists, or we simply do have some wrong OGL context somewhere. This is a workaround for until bigger viewport draw refactor is done (as Brecht mentioned display lists are deprecated in new OGL anyway).
This commit is contained in:
parent
78c491e62a
commit
6a4f2fd552
@ -180,7 +180,7 @@ static void ob_wire_color_blend_theme_id(const unsigned char ob_wire_col[4], con
|
||||
}
|
||||
|
||||
/* this condition has been made more complex since editmode can draw textures */
|
||||
static bool check_object_draw_texture(Scene *scene, View3D *v3d, const char drawtype)
|
||||
bool check_object_draw_texture(Scene *scene, View3D *v3d, const char drawtype)
|
||||
{
|
||||
/* texture and material draw modes */
|
||||
if (ELEM(v3d->drawtype, OB_TEXTURE, OB_MATERIAL) && drawtype > OB_SOLID) {
|
||||
|
@ -2034,6 +2034,7 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas
|
||||
(dob->type == OB_DUPLIGROUP && dob->animated) ||
|
||||
!(bb_tmp = BKE_object_boundbox_get(dob->ob)) ||
|
||||
draw_glsl_material(scene, dob->ob, v3d, dt) ||
|
||||
check_object_draw_texture(scene, v3d, dt) ||
|
||||
(base->object == OBACT && v3d->flag2 & V3D_SOLID_MATCAP))
|
||||
{
|
||||
// printf("draw_dupli_objects_color: skipping displist for %s\n", dob->ob->id.name + 2);
|
||||
|
@ -139,6 +139,8 @@ void view3d_cached_text_draw_begin(void);
|
||||
void view3d_cached_text_draw_add(const float co[3], const char *str, short xoffs, short flag, const unsigned char col[4]);
|
||||
void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, bool depth_write, float mat[4][4]);
|
||||
|
||||
bool check_object_draw_texture(struct Scene *scene, struct View3D *v3d, const char drawtype);
|
||||
|
||||
enum {
|
||||
V3D_CACHE_TEXT_ZBUF = (1 << 0),
|
||||
V3D_CACHE_TEXT_WORLDSPACE = (1 << 1),
|
||||
|
Loading…
Reference in New Issue
Block a user