OpenGl_PrimitiveArray::Render() - removed obsolete code, which become redundant (and broken)
after moving rendering of transparent objects into OpenGl_LayerList::renderTransparent().
const Graphic3d_Vec4* aFaceColors = !myBounds.IsNull() && !toHilight && anAspectFace->Aspect()->InteriorStyle() != Aspect_IS_HIDDENLINE
? myBounds->Colors
: NULL;
-
- const Standard_Boolean isHighlightWithTransparency = toHilight &&
- myDrawMode > GL_LINE_STRIP &&
- theWorkspace->InteriorColor().a() > 0.05f;
- GLint aPrevBlendSrc = GL_SRC_ALPHA, aPrevBlendDst = GL_ONE_MINUS_SRC_ALPHA;
- GLboolean wasBlendEnabled = GL_FALSE;
- if (isHighlightWithTransparency)
- {
- wasBlendEnabled = glIsEnabled (GL_BLEND);
- #if !defined(GL_ES_VERSION_2_0)
- glGetIntegerv (GL_BLEND_SRC, &aPrevBlendSrc);
- glGetIntegerv (GL_BLEND_DST, &aPrevBlendDst);
- #endif
- if (!wasBlendEnabled)
- {
- glEnable (GL_BLEND);
- }
- glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
-
drawArray (theWorkspace, aFaceColors, hasColorAttrib);
-
- if (isHighlightWithTransparency)
- {
- glBlendFunc (aPrevBlendSrc, aPrevBlendDst);
- if (!wasBlendEnabled)
- {
- glDisable (GL_BLEND);
- }
- }
}
if (myDrawMode <= GL_LINE_STRIP)
--- /dev/null
+puts "============"
+puts "0028527: Visualization, AIS_InteractiveContext - custom selection presentation is never removed from View"
+puts "============"
+puts ""
+
+pload MODELING XDE VISUALIZATION
+vclear
+vclose ALL
+vinit View1
+box b -100 0 0 10 20 30
+meshfromstl m [locate_data_file OMF6391_box.stl]
+
+vfit
+vsetdispmode m 2
+vselmode m 8 1
+vselect 0 0 409 409 0 409
+verase m
+
+vdisplay -dispMode 1 -highMode 1 b
+vfit
+if { [vreadpixel 165 400 rgb name] != "DARKGOLDENROD3" } { puts "Error: fit all produces incorrect result after Erase" }
+vdump $::imagedir/${::casename}_1.png
+
+verase b
+vdisplay m
+vfit
+vselmode m 8 1
+vselect 0 0 409 409 0 409
+vremove m
+
+vdisplay -dispMode 1 -highMode 1 b
+vfit
+if { [vreadpixel 165 400 rgb name] != "DARKGOLDENROD3" } { puts "Error: fit all produces incorrect result after Remove" }
+vdump $::imagedir/${::casename}_2.png
--- /dev/null
+puts "========"
+puts "0029051: Visualization, TKOpenGl - wrong color of transparent dynamic highlight with OIT tuned ON"
+puts "========"
+puts ""
+
+pload MODELING VISUALIZATION
+box b 1 2 3
+vclear
+vinit View1
+vdisplay -dispMode 1 b
+vfit
+vselprops dynHighlight -dispMode 1 -color RED -transp 0.2
+vmoveto 250 250
+vrenderparams -oit off
+if { [vreadpixel 250 250 rgb name] != "ORANGERED3" } { puts "Error: wrong highlight color with OIT turned OFF"}
+vdump $imagedir/${casename}_oit_off.png
+
+vrenderparams -oit 0
+vreadpixel 250 250 rgb name
+if { [vreadpixel 250 250 rgb name] != "ORANGERED3" } { puts "Error: wrong highlight color with OIT turned ON"}
+vdump $imagedir/${casename}_oit_on.png