View Issue Details

IDProjectCategoryView StatusLast Update
0013611CommunityOCCT:Visualizationpublic2011-04-06 18:44
ReporterabdAssigned Topsn 
PrioritynormalSeveritytrivial 
Status closedResolutionfixed 
OSWindows NT 
Summary0013611: [OCC Forum] Bug in opencascade6.1 in displaying both Text and Texture...
DescriptionBug is reproduced in Windows XP (NVidia Card) with version of OpenCASCADE 6.1.0.
When is used both texture fonts and order textures(AIS_TexturedShape) in one
presentation, opengl context lost drawing textures on the firts update.
If using bitmap fonts, all is works.

See the original message below and standard example for testing in attachment:

This message was sent from www.opencascade.org forum.
http://www.opencascade.org/org/forum/thread_10355/

From: Anjul Beohar <anjul.beohar@honeywell.com>

Hi,

I am facing one problem in displaying text when textured mode is enabled.I want
to display text on Textured shape when the mouse rolls over it. The code which I
have written for displaying the AISTextured box and highlighting the text is
given below:

gp_Pnt pnt(100,100,100);
TopoDS_Shape theBox = BRepPrimAPI_MakeBox(pnt,500,500,500);
Handle(AISTextureShape) m_AISTShape = new AISTextureShape(theBox);
TCollection_AsciiString TFileName("blablabla");
m_AISTShape->SetTextureFileName(TFileName);
m_AISTShape->SetTextureMapOn();
m_AISTShape->SetTextureScale(Standard_True, 1, 1);
m_AISTShape->SetTextureRepeat(Standard_True, 3, 3);
m_AISTShape->SetTextureOrigin(Standard_True, 0, 0);
m_AISTShape->SetDisplayMode(3);
m_hAISContext->Display(m_AISTShape,Standard_False);
m_hAISContext->UpdateCurrentViewer();

I am able to draw the Box having texture. For highlighting the text I am
overriding the Compute function of AISTextureShape as below

void AISTextureShape::Compute(const Handle(PrsMgr_PresentationManager3d)&
p_pPrsManager,const Handle(Prs3d_Presentation)& p_pPrs,const Standard_Integer
p_iMode){
switch (p_iMode) {
case 0: // Wireframe
{
p_pPrs->Clear();
gp_Pnt l_PrsPnt = GetPrsPoint();
StdPrs_WFDeflectionShape::
Add(p_pPrs,myshape,myDrawer);
TCollection_ExtendedString l_TCoText =
TCollection_ExtendedString(m_strTextName);
Prs3d_Text::Draw(p_pPrs,myDrawer,l_TCoText,
l_PrsPnt);
}
break;
default:
AIS_TexturedShape::Compute( p_pPrsManager,
p_pPrs, p_iMode);
break;
} // end switch
}

but the problem I am facing is this that highlighted text becomes a blue box
when I roll the mouse cursor over the box and the box looses its texture property.

I tried a lot to resolve this problem but I didn't get any solution. I think
this a bug in opencascade. if any body knows then please help me how to resolve
this problem.

Thanks
Anjul
Additional information
and documentation updates
Documentation remark, added by Pavel Supryatkin (psn) 2010-09-02 16:29:04:

Changes:
On Windows, OpenGL attributes related with textures are stored before
generation of texture fonts and restored after this, to eliminate
conflicts with other functionality dealing with textures.

TagsNo tags attached.
Test case number

Attached Files

Activities

2006-10-12 08:42

 

update.tgz (8,670 bytes)

psn

2010-09-02 18:29

developer   ~0012117

Bug solved in 20205 BUG.

bugmaster

2011-04-06 18:44

administrator   ~0012118

Bug solved by fix OCC20205 BUG.

Issue History

Date Modified Username Field Change
2006-10-12 11:50 bugmaster groupset1 => 4096
2006-10-12 11:50 bugmaster Customer => Community
2008-10-03 12:18 bugmaster Assigned To bugmaster => san
2008-10-03 12:18 bugmaster Status new => assigned
2008-11-12 12:09 san Assigned To san => psn
2009-01-14 12:46 psn OtherBugsDependingOnThis => 20205
2009-01-14 13:34 psn Status assigned => resolved
2009-03-19 16:57 bugmaster Status resolved => assigned
2010-09-02 18:29 psn Status assigned => resolved
2011-04-06 18:44 bugmaster Status resolved => closed
2011-04-06 18:44 bugmaster Resolution @0@ => fixed
2011-08-02 11:24 bugmaster Category OCCT:VIZ => OCCT:Visualization