|
Open CASCADE Technology 6.6.0
|
Text rendering.
#include <OpenGl_Text.hxx>

Public Member Functions | |
| OpenGl_Text (const TCollection_ExtendedString &theText, const OpenGl_Vec3 &thePoint, const OpenGl_TextParam &theParams) | |
| Main constructor. | |
| void | Init (const Handle< OpenGl_Context > &theCtx, const Standard_Utf8Char *theText, const OpenGl_Vec3 &thePoint) |
| Setup new string and position. | |
| void | Init (const Handle< OpenGl_Context > &theCtx, const Standard_Utf8Char *theText, const OpenGl_Vec3 &thePoint, const OpenGl_TextParam &theParams) |
| Setup new string and parameters. | |
| void | SetPosition (const OpenGl_Vec3 &thePoint) |
| Setup new position. | |
| void | SetFontSize (const Handle< OpenGl_Context > &theContext, const Standard_Integer theFontSize) |
| Setup new font size. | |
| virtual void | Render (const Handle< OpenGl_Workspace > &theWorkspace) const |
| virtual void | Release (const Handle< OpenGl_Context > &theContext) |
| Release GPU resources. | |
methods for compatibility with layers | |
| Handle< OpenGl_Font > | myFont |
| textures' IDs | |
| NCollection_Vector< GLuint > | myTextures |
| textures' IDs | |
| NCollection_Vector< Handle < OpenGl_VertexBuffer > > | myVertsVbo |
| VBOs of vertices. | |
| NCollection_Vector< Handle < OpenGl_VertexBuffer > > | myTCrdsVbo |
| VBOs of texture coordinates. | |
| NCollection_Vector< Handle < OpenGl_Vec2Array > > | myVertsArray |
| arrays of vertices (for compatibility mode) | |
| NCollection_Vector< Handle < OpenGl_Vec2Array > > | myTCrdsArray |
| arrays of vertices (for compatibility mode) | |
| Font_FTFont::Rect | myBndBox |
| textures' IDs | |
| GLdouble | myProjMatrix [16] |
| textures' IDs | |
| GLdouble | myModelMatrix [16] |
| textures' IDs | |
| GLint | myViewport [4] |
| textures' IDs | |
| GLdouble | myWinX |
| textures' IDs | |
| GLdouble | myWinY |
| textures' IDs | |
| GLdouble | myWinZ |
| textures' IDs | |
| GLdouble | myScaleHeight |
| textures' IDs | |
| GLdouble | myExportHeight |
| textures' IDs | |
| OpenGl_TextParam | myParams |
| textures' IDs | |
| NCollection_String | myString |
| textures' IDs | |
| OpenGl_Vec3 | myPoint |
| textures' IDs | |
| bool | myIs2d |
| textures' IDs | |
| OpenGl_Text () | |
| Empty constructor. | |
| void | Init (const Handle< OpenGl_Context > &theCtx, const TCollection_ExtendedString &theText, const OpenGl_Vec2 &thePoint, const OpenGl_TextParam &theParams) |
| Setup new string and parameters. | |
| void | Render (const Handle< OpenGl_PrinterContext > &thePrintCtx, const Handle< OpenGl_Context > &theCtx, const OpenGl_AspectText &theTextAspect) const |
| Perform rendering. | |
| static TCollection_AsciiString | FontKey (const OpenGl_AspectText &theAspect, const Standard_Integer theHeight) |
| Create key for shared resource. | |
| static Handle< OpenGl_Font > | FindFont (const Handle< OpenGl_Context > &theCtx, const OpenGl_AspectText &theAspect, const Standard_Integer theHeight, const TCollection_AsciiString theKey) |
| Find shared resource for specified font or initialize new one. | |
| static void | StringSize (const Handle< OpenGl_Context > &theCtx, const NCollection_String &theText, const OpenGl_AspectText &theTextAspect, const OpenGl_TextParam &theParams, Standard_ShortReal &theWidth, Standard_ShortReal &theAscent, Standard_ShortReal &theDescent) |
| Compute text width. | |
| virtual | ~OpenGl_Text () |
| Destructor. | |
| OpenGl_Text::OpenGl_Text | ( | const TCollection_ExtendedString & | theText, |
| const OpenGl_Vec3 & | thePoint, | ||
| const OpenGl_TextParam & | theParams | ||
| ) |
| OpenGl_Text::OpenGl_Text | ( | ) |
| virtual OpenGl_Text::~OpenGl_Text | ( | ) | [protected, virtual] |
| static Handle< OpenGl_Font > OpenGl_Text::FindFont | ( | const Handle< OpenGl_Context > & | theCtx, |
| const OpenGl_AspectText & | theAspect, | ||
| const Standard_Integer | theHeight, | ||
| const TCollection_AsciiString | theKey | ||
| ) | [static] |
| static TCollection_AsciiString OpenGl_Text::FontKey | ( | const OpenGl_AspectText & | theAspect, |
| const Standard_Integer | theHeight | ||
| ) | [static] |
| void OpenGl_Text::Init | ( | const Handle< OpenGl_Context > & | theCtx, |
| const Standard_Utf8Char * | theText, | ||
| const OpenGl_Vec3 & | thePoint, | ||
| const OpenGl_TextParam & | theParams | ||
| ) |
| void OpenGl_Text::Init | ( | const Handle< OpenGl_Context > & | theCtx, |
| const TCollection_ExtendedString & | theText, | ||
| const OpenGl_Vec2 & | thePoint, | ||
| const OpenGl_TextParam & | theParams | ||
| ) |
| void OpenGl_Text::Init | ( | const Handle< OpenGl_Context > & | theCtx, |
| const Standard_Utf8Char * | theText, | ||
| const OpenGl_Vec3 & | thePoint | ||
| ) |
| virtual void OpenGl_Text::Release | ( | const Handle< OpenGl_Context > & | theContext | ) | [virtual] |
Implements OpenGl_Element.
| void OpenGl_Text::Render | ( | const Handle< OpenGl_PrinterContext > & | thePrintCtx, |
| const Handle< OpenGl_Context > & | theCtx, | ||
| const OpenGl_AspectText & | theTextAspect | ||
| ) | const |
| virtual void OpenGl_Text::Render | ( | const Handle< OpenGl_Workspace > & | theWorkspace | ) | const [virtual] |
Implements OpenGl_Element.
| void OpenGl_Text::SetFontSize | ( | const Handle< OpenGl_Context > & | theContext, |
| const Standard_Integer | theFontSize | ||
| ) |
| void OpenGl_Text::SetPosition | ( | const OpenGl_Vec3 & | thePoint | ) |
| static void OpenGl_Text::StringSize | ( | const Handle< OpenGl_Context > & | theCtx, |
| const NCollection_String & | theText, | ||
| const OpenGl_AspectText & | theTextAspect, | ||
| const OpenGl_TextParam & | theParams, | ||
| Standard_ShortReal & | theWidth, | ||
| Standard_ShortReal & | theAscent, | ||
| Standard_ShortReal & | theDescent | ||
| ) | [static] |
Font_FTFont::Rect OpenGl_Text::myBndBox [mutable, protected] |
GLdouble OpenGl_Text::myExportHeight [mutable, protected] |
Handle< OpenGl_Font > OpenGl_Text::myFont [mutable, protected] |
bool OpenGl_Text::myIs2d [protected] |
GLdouble OpenGl_Text::myModelMatrix[16] [mutable, protected] |
OpenGl_TextParam OpenGl_Text::myParams [protected] |
OpenGl_Vec3 OpenGl_Text::myPoint [protected] |
GLdouble OpenGl_Text::myProjMatrix[16] [mutable, protected] |
GLdouble OpenGl_Text::myScaleHeight [mutable, protected] |
NCollection_String OpenGl_Text::myString [protected] |
NCollection_Vector<Handle< OpenGl_Vec2Array > > OpenGl_Text::myTCrdsArray [mutable, protected] |
NCollection_Vector<Handle< OpenGl_VertexBuffer > > OpenGl_Text::myTCrdsVbo [mutable, protected] |
NCollection_Vector<GLuint> OpenGl_Text::myTextures [mutable, protected] |
NCollection_Vector<Handle< OpenGl_Vec2Array > > OpenGl_Text::myVertsArray [mutable, protected] |
NCollection_Vector<Handle< OpenGl_VertexBuffer > > OpenGl_Text::myVertsVbo [mutable, protected] |
GLint OpenGl_Text::myViewport[4] [mutable, protected] |
GLdouble OpenGl_Text::myWinX [mutable, protected] |
GLdouble OpenGl_Text::myWinY [mutable, protected] |
GLdouble OpenGl_Text::myWinZ [mutable, protected] |
1.7.4