myModulate = Standard_False;
}
+//=======================================================================
+//function : SetColor
+//purpose :
+//=======================================================================
+
+void AIS_TexturedShape::SetColor (const Quantity_Color& theColor)
+{
+ AIS_Shape::SetColor (theColor);
+
+ if (!GetContext().IsNull())
+ {
+ if (GetContext()->MainPrsMgr()->HasPresentation (this, 3))
+ {
+ updateAttributes (GetContext()->MainPrsMgr()->Presentation (this, 3)->Presentation());
+ }
+ }
+}
+
//=======================================================================
//function : UpdateAttributes
//purpose :
void AIS_TexturedShape::updateAttributes (const Handle(Prs3d_Presentation)& thePrs)
{
- Prs3d_ShadingAspect aDummy;
- myAspect = aDummy.Aspect();
+ myAspect = new Graphic3d_AspectFillArea3d (*myDrawer->ShadingAspect()->Aspect());
if (HasPolygonOffsets())
{
// Issue 23115: copy polygon offset settings passed through myDrawer
//! @endcode
Standard_EXPORT void UpdateAttributes();
+ //! Sets the color
+ Standard_EXPORT virtual void SetColor (const Quantity_Color& theColor);
+
//! Enables texture modulation
Standard_EXPORT void EnableTextureModulate();
--- /dev/null
+puts "============"
+puts "CR23804"
+puts "============"
+puts ""
+
+############################################################
+# Unexpected color modulation during texture mapping
+############################################################
+
+box b 100 100 100
+vinit
+vdisplay b
+vfit
+vsetdispmode b 1
+vsetmaterial b plastic
+vdump $imagedir/${casename}_1.png
+
+vsetcolor b ANTIQUEWHITE
+vdump $imagedir/${casename}_2.png
+
+vtexture b 3
+vdump $imagedir/${casename}_3.png
+
+vsetcolor b ANTIQUEWHITE
+vdump $imagedir/${casename}_4.png