Permalink
Browse files

Fixed backface culling in proxy mode.

Back side faces was not shown in proxy work mode, when there where
hidden/hole faces in the model.

NOTE: Fixed various hidden/hole face drawing problems. Hidden hard
edges was drawn reported by Ania. Smooth-preview showed edges on
hidden faces and the backside of visible faces was not shown in flat
shaded view.
  • Loading branch information...
1 parent d59426b commit 21621f22d163bf6da2161f32e1aab84116bcf3f2 @dgud dgud committed with bjorng Nov 28, 2009
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/wings_proxy.erl
View
@@ -223,7 +223,7 @@ draw(#dlo{proxy_data=#sp{faces=Dl},drag=none}=D, Wire, SceneLights) ->
draw(#dlo{proxy_data=#sp{faces=Dl}}=D, _Wire, SceneLights) ->
draw_1(D, Dl, true, proxy_moving_opacity, cage, SceneLights).
-draw_1(D, Dl, Wire, Key, EdgeStyleKey, SceneLights) ->
+draw_1(#dlo{src_we=We} = D, Dl, Wire, Key, EdgeStyleKey, SceneLights) ->
gl:shadeModel(?GL_SMOOTH),
wings_render:enable_lighting(SceneLights),
gl:enable(?GL_POLYGON_OFFSET_FILL),
@@ -240,7 +240,12 @@ draw_1(D, Dl, Wire, Key, EdgeStyleKey, SceneLights) ->
gl:blendColor(0, 0, 0, Opacity)
end
end,
+ case wings_we:is_open(We) of
+ true -> gl:disable(?GL_CULL_FACE);
+ false -> ignore
+ end,
wings_dl:call(Dl),
+ gl:enable(?GL_CULL_FACE),
gl:disable(?GL_POLYGON_OFFSET_FILL),
wings_render:disable_lighting(),
gl:shadeModel(?GL_FLAT),

0 comments on commit 21621f2

Please sign in to comment.