projects
/
occt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0031193: Visualization - OpenGl_Flipping wrong text position if local transformation set
[occt.git]
/
src
/
OpenGl
/
OpenGl_Text.cxx
diff --git
a/src/OpenGl/OpenGl_Text.cxx
b/src/OpenGl/OpenGl_Text.cxx
index
a3c5be6
..
d9551e0
100644
(file)
--- a/
src/OpenGl/OpenGl_Text.cxx
+++ b/
src/OpenGl/OpenGl_Text.cxx
@@
-472,6
+472,12
@@
void OpenGl_Text::setupMatrix (const Handle(OpenGl_Context)& theCtx,
{
OpenGl_Mat4d aCurrentWorldViewMat;
aCurrentWorldViewMat.Convert (theCtx->WorldViewState.Current());
{
OpenGl_Mat4d aCurrentWorldViewMat;
aCurrentWorldViewMat.Convert (theCtx->WorldViewState.Current());
+
+ // apply local transformation
+ OpenGl_Mat4d aModelWorld;
+ aModelWorld.Convert (theCtx->ModelWorldState.Current());
+ aCurrentWorldViewMat = aCurrentWorldViewMat * aModelWorld;
+
theCtx->WorldViewState.SetCurrent<Standard_Real> (aCurrentWorldViewMat * aModViewMat);
}
else
theCtx->WorldViewState.SetCurrent<Standard_Real> (aCurrentWorldViewMat * aModViewMat);
}
else